| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 1 | # Copyright (C) 2015 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 | |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 17 | # Android libraries referenced by this module's resources. |
| 18 | resource_libs := \ |
| 19 | android-support-v7-appcompat \ |
| 20 | android-support-v7-recyclerview |
| 21 | |
| Chris Banes | 82b5549 | 2016-01-22 11:11:47 +0000 | [diff] [blame] | 22 | # Build the resources using the latest applicable SDK version. |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 23 | # We do this here because the final static library must be compiled with an older |
| 24 | # SDK version than the resources. The resources library and the R class that it |
| 25 | # contains will not be linked into the final static library. |
| 26 | include $(CLEAR_VARS) |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 27 | LOCAL_USE_AAPT2 := true |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 28 | LOCAL_MODULE := android-support-design-res |
| Chris Banes | 82b5549 | 2016-01-22 11:11:47 +0000 | [diff] [blame] | 29 | LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 30 | LOCAL_SRC_FILES := $(call all-java-files-under, dummy) |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 31 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res |
| 32 | LOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs) |
| 33 | LOCAL_AAPT_FLAGS := --no-version-vectors |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 34 | LOCAL_JAR_EXCLUDE_FILES := none |
| Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 35 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 36 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 37 | |
| Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 38 | support_module_src_files := $(LOCAL_SRC_FILES) |
| 39 | |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 40 | # A helper sub-library to resolve cyclic dependencies between src and the platform dependent |
| 41 | # implementations |
| 42 | include $(CLEAR_VARS) |
| 43 | LOCAL_MODULE := android-support-design-base |
| Kirill Grouchnikov | 529cd21 | 2016-05-11 16:45:59 -0700 | [diff] [blame^] | 44 | LOCAL_SDK_VERSION := 9 |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 45 | LOCAL_SRC_FILES := $(call all-java-files-under, base) |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 46 | LOCAL_JAVA_LIBRARIES := \ |
| 47 | android-support-design-res \ |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 48 | android-support-v4 \ |
| Yuichi Araki | 64bcb67 | 2015-09-03 10:25:04 +0000 | [diff] [blame] | 49 | android-support-v7-appcompat \ |
| 50 | android-support-v7-recyclerview |
| Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 51 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 52 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 53 | |
| Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 54 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 55 | |
| Kirill Grouchnikov | f4893cf | 2016-05-10 11:02:58 -0700 | [diff] [blame] | 56 | # A helper sub-library that makes direct use of Gingerbread APIs |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 57 | include $(CLEAR_VARS) |
| Kirill Grouchnikov | f4893cf | 2016-05-10 11:02:58 -0700 | [diff] [blame] | 58 | LOCAL_MODULE := android-support-design-gingerbread |
| Kirill Grouchnikov | 529cd21 | 2016-05-11 16:45:59 -0700 | [diff] [blame^] | 59 | LOCAL_SDK_VERSION := 9 |
| Kirill Grouchnikov | f4893cf | 2016-05-10 11:02:58 -0700 | [diff] [blame] | 60 | LOCAL_SRC_FILES := $(call all-java-files-under, gingerbread) |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 61 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-base |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 62 | LOCAL_JAVA_LIBRARIES := \ |
| 63 | android-support-design-res \ |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 64 | android-support-v4 \ |
| Yuichi Araki | 64bcb67 | 2015-09-03 10:25:04 +0000 | [diff] [blame] | 65 | android-support-v7-appcompat \ |
| 66 | android-support-v7-recyclerview |
| Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 67 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 68 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 69 | |
| Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 70 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 71 | |
| Adam Powell | a966c6c | 2015-02-04 18:25:49 -0800 | [diff] [blame] | 72 | # A helper sub-library that makes direct use of Honeycomb APIs |
| 73 | include $(CLEAR_VARS) |
| 74 | LOCAL_MODULE := android-support-design-honeycomb |
| 75 | LOCAL_SDK_VERSION := 11 |
| 76 | LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb) |
| Kirill Grouchnikov | f4893cf | 2016-05-10 11:02:58 -0700 | [diff] [blame] | 77 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-gingerbread |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 78 | LOCAL_JAVA_LIBRARIES := \ |
| 79 | android-support-design-res \ |
| Adam Powell | a966c6c | 2015-02-04 18:25:49 -0800 | [diff] [blame] | 80 | android-support-v4 \ |
| Yuichi Araki | 64bcb67 | 2015-09-03 10:25:04 +0000 | [diff] [blame] | 81 | android-support-v7-appcompat \ |
| 82 | android-support-v7-recyclerview |
| Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 83 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| Adam Powell | a966c6c | 2015-02-04 18:25:49 -0800 | [diff] [blame] | 84 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 85 | |
| Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 86 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 87 | |
| Chris Banes | 631f64e | 2015-04-10 10:46:13 +0100 | [diff] [blame] | 88 | # A helper sub-library that makes direct use of Honeycomb MR1 APIs |
| 89 | include $(CLEAR_VARS) |
| 90 | LOCAL_MODULE := android-support-design-honeycomb-mr1 |
| 91 | LOCAL_SDK_VERSION := 12 |
| 92 | LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb-mr1) |
| 93 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 94 | LOCAL_JAVA_LIBRARIES := \ |
| 95 | android-support-design-res \ |
| Chris Banes | 631f64e | 2015-04-10 10:46:13 +0100 | [diff] [blame] | 96 | android-support-v4 \ |
| Yuichi Araki | 64bcb67 | 2015-09-03 10:25:04 +0000 | [diff] [blame] | 97 | android-support-v7-appcompat \ |
| 98 | android-support-v7-recyclerview |
| Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 99 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| Chris Banes | 631f64e | 2015-04-10 10:46:13 +0100 | [diff] [blame] | 100 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 101 | |
| Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 102 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 103 | |
| Chris Banes | 9ec922c | 2015-10-19 09:41:05 +0100 | [diff] [blame] | 104 | # A helper sub-library that makes direct use of ICS APIs |
| 105 | include $(CLEAR_VARS) |
| 106 | LOCAL_MODULE := android-support-design-ics |
| 107 | LOCAL_SDK_VERSION := 14 |
| 108 | LOCAL_SRC_FILES := $(call all-java-files-under, ics) |
| 109 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb-mr1 |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 110 | LOCAL_JAVA_LIBRARIES := \ |
| 111 | android-support-design-res \ |
| Chris Banes | 9ec922c | 2015-10-19 09:41:05 +0100 | [diff] [blame] | 112 | android-support-v4 \ |
| 113 | android-support-v7-appcompat \ |
| 114 | android-support-v7-recyclerview |
| Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 115 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| Chris Banes | 9ec922c | 2015-10-19 09:41:05 +0100 | [diff] [blame] | 116 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 117 | |
| Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 118 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 119 | |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 120 | # A helper sub-library that makes direct use of Lollipop APIs |
| 121 | include $(CLEAR_VARS) |
| 122 | LOCAL_MODULE := android-support-design-lollipop |
| 123 | LOCAL_SDK_VERSION := 21 |
| 124 | LOCAL_SRC_FILES := $(call all-java-files-under, lollipop) |
| Chris Banes | 9ec922c | 2015-10-19 09:41:05 +0100 | [diff] [blame] | 125 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-ics |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 126 | LOCAL_JAVA_LIBRARIES := \ |
| 127 | android-support-design-res \ |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 128 | android-support-v4 \ |
| Yuichi Araki | 64bcb67 | 2015-09-03 10:25:04 +0000 | [diff] [blame] | 129 | android-support-v7-appcompat \ |
| 130 | android-support-v7-recyclerview |
| Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 131 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 132 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 133 | |
| Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 134 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 135 | |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 136 | # Here is the final static library that apps can link against. |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 137 | # Applications that use this library must specify |
| 138 | # |
| 139 | # LOCAL_STATIC_ANDROID_LIBRARIES := \ |
| 140 | # android-support-design \ |
| 141 | # android-support-v7-appcompat \ |
| 142 | # android-support-v7-recyclerview \ |
| 143 | # android-support-v4 |
| 144 | # |
| 145 | # in their makefiles to include the resources and their dependencies in their package. |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 146 | include $(CLEAR_VARS) |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 147 | LOCAL_USE_AAPT2 := true |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 148 | LOCAL_MODULE := android-support-design |
| Chris Banes | 82b5549 | 2016-01-22 11:11:47 +0000 | [diff] [blame] | 149 | LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 150 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
| 151 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-lollipop |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 152 | LOCAL_STATIC_ANDROID_LIBRARIES := android-support-design-res |
| 153 | LOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs) android-support-v4 |
| 154 | LOCAL_JAR_EXCLUDE_FILES := none |
| Neil Fuller | e1cd5a1 | 2016-02-25 11:41:17 +0000 | [diff] [blame] | 155 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| Adam Lesinski | 6759b10 | 2016-02-24 19:57:25 -0800 | [diff] [blame] | 156 | LOCAL_AAPT_FLAGS := --add-javadoc-annotation doconly |
| Chris Banes | 19b2eea | 2015-01-27 11:07:52 +0000 | [diff] [blame] | 157 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| Chris Banes | 27238d1 | 2015-04-01 15:44:41 +0100 | [diff] [blame] | 158 | |
| Chris Banes | 95ad49b | 2015-10-19 11:02:33 +0100 | [diff] [blame] | 159 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 160 | |
| Chris Banes | 27238d1 | 2015-04-01 15:44:41 +0100 | [diff] [blame] | 161 | # API Check |
| 162 | # --------------------------------------------- |
| 163 | support_module := $(LOCAL_MODULE) |
| 164 | support_module_api_dir := $(LOCAL_PATH)/api |
| Chris Banes | 27238d1 | 2015-04-01 15:44:41 +0100 | [diff] [blame] | 165 | support_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) |
| Chris Banes | 6396405 | 2015-04-30 10:37:19 +0100 | [diff] [blame] | 166 | support_module_java_packages := android.support.design.* |
| Chris Banes | 27238d1 | 2015-04-01 15:44:41 +0100 | [diff] [blame] | 167 | include $(SUPPORT_API_CHECK) |