Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 1 | # Copyright (C) 2014 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Chris Banes | 82b5549 | 2016-01-22 11:11:47 +0000 | [diff] [blame] | 17 | # Build the resources using the latest applicable SDK version. |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 18 | # We do this here because the final static library must be compiled with an older |
| 19 | # SDK version than the resources. The resources library and the R class that it |
| 20 | # contains will not be linked into the final static library. |
| 21 | include $(CLEAR_VARS) |
| 22 | LOCAL_MODULE := android-support-v7-cardview-res |
Chris Banes | 82b5549 | 2016-01-22 11:11:47 +0000 | [diff] [blame] | 23 | LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 24 | LOCAL_SRC_FILES := $(call all-java-files-under, dummy) |
| 25 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res |
| 26 | LOCAL_JAR_EXCLUDE_FILES := none |
Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 27 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 28 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 29 | |
Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 30 | support_module_src_files := $(LOCAL_SRC_FILES) |
| 31 | |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 32 | # A helper sub-library to resolve cyclic dependencies between CardView and platform dependent |
| 33 | # implementations |
| 34 | include $(CLEAR_VARS) |
| 35 | LOCAL_MODULE := android-support-v7-cardview-base |
| 36 | LOCAL_SDK_VERSION := 7 |
| 37 | LOCAL_SRC_FILES := $(call all-java-files-under, base) |
Aurimas Liutikas | d2c6029 | 2016-03-02 18:18:53 -0800 | [diff] [blame] | 38 | LOCAL_JAVA_LIBRARIES := android-support-annotations |
Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 39 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 40 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 41 | |
Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 42 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 43 | |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 44 | # A helper sub-library that makes direct use of Eclair MR1 APIs |
| 45 | include $(CLEAR_VARS) |
| 46 | LOCAL_MODULE := android-support-v7-cardview-eclair-mr1 |
| 47 | LOCAL_SDK_VERSION := 7 |
| 48 | LOCAL_SRC_FILES := $(call all-java-files-under, eclair-mr1) |
| 49 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-cardview-base |
Aurimas Liutikas | d2c6029 | 2016-03-02 18:18:53 -0800 | [diff] [blame] | 50 | LOCAL_JAVA_LIBRARIES := android-support-v7-cardview-res \ |
| 51 | android-support-annotations |
Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 52 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 53 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 54 | |
Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 55 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 56 | |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 57 | # A helper sub-library that makes direct use of JB MR1 APIs |
| 58 | include $(CLEAR_VARS) |
| 59 | LOCAL_MODULE := android-support-v7-cardview-jellybean-mr1 |
| 60 | LOCAL_SDK_VERSION := 17 |
| 61 | LOCAL_SRC_FILES := $(call all-java-files-under, jellybean-mr1) |
| 62 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-cardview-eclair-mr1 |
Aurimas Liutikas | d2c6029 | 2016-03-02 18:18:53 -0800 | [diff] [blame] | 63 | LOCAL_JAVA_LIBRARIES := android-support-v7-cardview-res \ |
| 64 | android-support-annotations |
Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 65 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 66 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 67 | |
Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 68 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 69 | |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 70 | # A helper sub-library that makes direct use of L APIs |
| 71 | include $(CLEAR_VARS) |
| 72 | LOCAL_MODULE := android-support-v7-cardview-api21 |
Griff Hazen | fcec128 | 2014-11-18 12:35:04 -0800 | [diff] [blame] | 73 | LOCAL_SDK_VERSION := 21 |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 74 | LOCAL_SRC_FILES := $(call all-java-files-under, api21) |
Adam Lesinski | 57f3918 | 2016-04-01 22:13:17 +0000 | [diff] [blame^] | 75 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-cardview-base \ |
| 76 | android-support-v7-cardview-jellybean-mr1 |
| 77 | LOCAL_JAVA_LIBRARIES := android-support-v7-cardview-res \ |
Aurimas Liutikas | d2c6029 | 2016-03-02 18:18:53 -0800 | [diff] [blame] | 78 | android-support-annotations |
Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 79 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 80 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 81 | |
Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 82 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 83 | |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 84 | # Here is the final static library that apps can link against. |
Adam Lesinski | 57f3918 | 2016-04-01 22:13:17 +0000 | [diff] [blame^] | 85 | # The R class is automatically excluded from the generated library. |
| 86 | # Applications that use this library must specify LOCAL_RESOURCE_DIR |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 87 | # in their makefiles to include the resources in their package. |
| 88 | include $(CLEAR_VARS) |
| 89 | LOCAL_MODULE := android-support-v7-cardview |
| 90 | LOCAL_SDK_VERSION := 7 |
| 91 | LOCAL_SRC_FILES := $(call all-java-files-under,src) |
| 92 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-cardview-api21 |
Adam Lesinski | 57f3918 | 2016-04-01 22:13:17 +0000 | [diff] [blame^] | 93 | LOCAL_JAVA_LIBRARIES := android-support-v7-cardview-res \ |
| 94 | android-support-annotations |
Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 95 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
Yigit Boyar | 83b8526 | 2014-05-15 20:50:24 -0700 | [diff] [blame] | 96 | include $(BUILD_STATIC_JAVA_LIBRARY) |
Chris Banes | f62fcde | 2015-02-25 10:42:47 +0000 | [diff] [blame] | 97 | |
Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 98 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 99 | |
Chris Banes | f62fcde | 2015-02-25 10:42:47 +0000 | [diff] [blame] | 100 | # API Check |
| 101 | # --------------------------------------------- |
| 102 | support_module := $(LOCAL_MODULE) |
| 103 | support_module_api_dir := $(LOCAL_PATH)/api |
Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 104 | support_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) |
Chris Banes | f62fcde | 2015-02-25 10:42:47 +0000 | [diff] [blame] | 105 | support_module_java_packages := android.support.v7.widget |
| 106 | include $(SUPPORT_API_CHECK) |