Kirill Grouchnikov | 3ac77bf | 2016-04-27 12:46:47 -0400 | [diff] [blame^] | 1 | # Copyright (C) 2011 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 | |
| 17 | # A helper sub-library that makes direct use of Donut APIs. |
| 18 | include $(CLEAR_VARS) |
| 19 | LOCAL_MODULE := android-support-compat-donut |
| 20 | LOCAL_SDK_VERSION := 4 |
| 21 | LOCAL_SRC_FILES := $(call all-java-files-under, donut) |
| 22 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-annotations |
| 23 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 24 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 25 | |
| 26 | support_module_src_files := $(LOCAL_SRC_FILES) |
| 27 | support_module_java_libraries := android-support-annotations |
| 28 | |
| 29 | # ----------------------------------------------------------------------- |
| 30 | |
| 31 | # A helper sub-library that makes direct use of Eclair APIs. |
| 32 | include $(CLEAR_VARS) |
| 33 | LOCAL_MODULE := android-support-compat-eclair |
| 34 | LOCAL_SDK_VERSION := 5 |
| 35 | LOCAL_SRC_FILES := $(call all-java-files-under, eclair) |
| 36 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-donut |
| 37 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 38 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 39 | |
| 40 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 41 | |
| 42 | # ----------------------------------------------------------------------- |
| 43 | |
| 44 | # A helper sub-library that makes direct use of Eclair MR1 APIs. |
| 45 | include $(CLEAR_VARS) |
| 46 | LOCAL_MODULE := android-support-compat-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-compat-eclair |
| 50 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 51 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 52 | |
| 53 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 54 | |
| 55 | # ----------------------------------------------------------------------- |
| 56 | |
| 57 | # A helper sub-library that makes direct use of Froyo APIs. |
| 58 | include $(CLEAR_VARS) |
| 59 | LOCAL_MODULE := android-support-compat-froyo |
| 60 | LOCAL_SDK_VERSION := 8 |
| 61 | LOCAL_SRC_FILES := $(call all-java-files-under, froyo) |
| 62 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-eclair-mr1 |
| 63 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 64 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 65 | |
| 66 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 67 | |
| 68 | # ----------------------------------------------------------------------- |
| 69 | |
| 70 | # A helper sub-library that makes direct use of Gingerbread APIs. |
| 71 | include $(CLEAR_VARS) |
| 72 | LOCAL_MODULE := android-support-compat-gingerbread |
| 73 | LOCAL_SDK_VERSION := 9 |
| 74 | LOCAL_SRC_FILES := $(call all-java-files-under, gingerbread) |
| 75 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-froyo |
| 76 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 77 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 78 | |
| 79 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 80 | |
| 81 | # ----------------------------------------------------------------------- |
| 82 | |
| 83 | # A helper sub-library that makes direct use of Honeycomb APIs. |
| 84 | include $(CLEAR_VARS) |
| 85 | LOCAL_MODULE := android-support-compat-honeycomb |
| 86 | LOCAL_SDK_VERSION := 11 |
| 87 | LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb) |
| 88 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-gingerbread |
| 89 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 90 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 91 | |
| 92 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 93 | |
| 94 | # ----------------------------------------------------------------------- |
| 95 | |
| 96 | # A helper sub-library that makes direct use of Honeycomb MR1 APIs. |
| 97 | include $(CLEAR_VARS) |
| 98 | LOCAL_MODULE := android-support-compat-honeycomb-mr1 |
| 99 | LOCAL_SDK_VERSION := 12 |
| 100 | LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb_mr1) |
| 101 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-honeycomb |
| 102 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 103 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 104 | |
| 105 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 106 | |
| 107 | # ----------------------------------------------------------------------- |
| 108 | |
| 109 | # A helper sub-library that makes direct use of Honeycomb MR2 APIs. |
| 110 | include $(CLEAR_VARS) |
| 111 | LOCAL_MODULE := android-support-compat-honeycomb-mr2 |
| 112 | LOCAL_SDK_VERSION := 13 |
| 113 | LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb_mr2) |
| 114 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-honeycomb-mr1 |
| 115 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 116 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 117 | |
| 118 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 119 | |
| 120 | # ----------------------------------------------------------------------- |
| 121 | |
| 122 | # A helper sub-library that makes direct use of Ice Cream Sandwich APIs. |
| 123 | include $(CLEAR_VARS) |
| 124 | LOCAL_MODULE := android-support-compat-ics |
| 125 | LOCAL_SDK_VERSION := 14 |
| 126 | LOCAL_SRC_FILES := $(call all-java-files-under, ics) |
| 127 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-honeycomb-mr2 |
| 128 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 129 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 130 | |
| 131 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 132 | |
| 133 | # ----------------------------------------------------------------------- |
| 134 | |
| 135 | # A helper sub-library that makes direct use of Ice Cream Sandwich MR1 APIs. |
| 136 | include $(CLEAR_VARS) |
| 137 | LOCAL_MODULE := android-support-compat-ics-mr1 |
| 138 | LOCAL_SDK_VERSION := 15 |
| 139 | LOCAL_SRC_FILES := $(call all-java-files-under, ics-mr1) |
| 140 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-ics |
| 141 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 142 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 143 | |
| 144 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 145 | |
| 146 | # ----------------------------------------------------------------------- |
| 147 | |
| 148 | # A helper sub-library that makes direct use of JellyBean APIs. |
| 149 | include $(CLEAR_VARS) |
| 150 | LOCAL_MODULE := android-support-compat-jellybean |
| 151 | LOCAL_SDK_VERSION := 16 |
| 152 | LOCAL_SRC_FILES := $(call all-java-files-under, jellybean) |
| 153 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-ics-mr1 |
| 154 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 155 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 156 | |
| 157 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 158 | |
| 159 | # ----------------------------------------------------------------------- |
| 160 | |
| 161 | # A helper sub-library that makes direct use of JellyBean MR1 APIs. |
| 162 | include $(CLEAR_VARS) |
| 163 | LOCAL_MODULE := android-support-compat-jellybean-mr1 |
| 164 | LOCAL_SDK_VERSION := 17 |
| 165 | LOCAL_SRC_FILES := $(call all-java-files-under, jellybean-mr1) |
| 166 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-jellybean |
| 167 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 168 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 169 | |
| 170 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 171 | |
| 172 | # ----------------------------------------------------------------------- |
| 173 | |
| 174 | # A helper sub-library that makes direct use of JellyBean MR2 APIs. |
| 175 | include $(CLEAR_VARS) |
| 176 | LOCAL_MODULE := android-support-compat-jellybean-mr2 |
| 177 | LOCAL_SDK_VERSION := 18 |
| 178 | LOCAL_SRC_FILES := $(call all-java-files-under, jellybean-mr2) |
| 179 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-jellybean-mr1 |
| 180 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 181 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 182 | |
| 183 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 184 | |
| 185 | # ----------------------------------------------------------------------- |
| 186 | |
| 187 | # A helper sub-library that makes direct use of KitKat APIs. |
| 188 | include $(CLEAR_VARS) |
| 189 | LOCAL_MODULE := android-support-compat-kitkat |
| 190 | LOCAL_SDK_VERSION := 19 |
| 191 | LOCAL_SRC_FILES := $(call all-java-files-under, kitkat) |
| 192 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-jellybean-mr2 |
| 193 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 194 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 195 | |
| 196 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 197 | |
| 198 | # ----------------------------------------------------------------------- |
| 199 | |
| 200 | # A helper sub-library that makes direct use of V20 APIs. |
| 201 | include $(CLEAR_VARS) |
| 202 | LOCAL_MODULE := android-support-compat-api20 |
| 203 | LOCAL_SDK_VERSION := 20 |
| 204 | LOCAL_SRC_FILES := $(call all-java-files-under, api20) |
| 205 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-kitkat |
| 206 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 207 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 208 | |
| 209 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 210 | |
| 211 | # ----------------------------------------------------------------------- |
| 212 | |
| 213 | # A helper sub-library that makes direct use of Lollipop APIs. |
| 214 | include $(CLEAR_VARS) |
| 215 | LOCAL_MODULE := android-support-compat-api21 |
| 216 | LOCAL_SDK_VERSION := 21 |
| 217 | LOCAL_SRC_FILES := $(call all-java-files-under, api21) |
| 218 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-api20 |
| 219 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 220 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 221 | |
| 222 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 223 | |
| 224 | # ----------------------------------------------------------------------- |
| 225 | |
| 226 | # A helper sub-library that makes direct use of V22 APIs. |
| 227 | include $(CLEAR_VARS) |
| 228 | LOCAL_MODULE := android-support-compat-api22 |
| 229 | LOCAL_SDK_VERSION := 22 |
| 230 | LOCAL_SRC_FILES := $(call all-java-files-under, api22) |
| 231 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-api21 |
| 232 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 233 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 234 | |
| 235 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 236 | |
| 237 | # ----------------------------------------------------------------------- |
| 238 | |
| 239 | # A helper sub-library that makes direct use of V23 APIs. |
| 240 | include $(CLEAR_VARS) |
| 241 | LOCAL_MODULE := android-support-compat-api23 |
| 242 | LOCAL_SDK_VERSION := 23 |
| 243 | LOCAL_SRC_FILES := $(call all-java-files-under, api23) |
| 244 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-api22 |
| 245 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 246 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 247 | |
| 248 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 249 | |
| 250 | # ----------------------------------------------------------------------- |
| 251 | |
| 252 | # A helper sub-library that makes direct use of V24 APIs. |
| 253 | include $(CLEAR_VARS) |
| 254 | LOCAL_MODULE := android-support-compat-api24 |
| 255 | LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) |
| 256 | LOCAL_SRC_FILES := $(call all-java-files-under, api24) |
| 257 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-compat-api23 |
| 258 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 259 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 260 | |
| 261 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 262 | |
| 263 | # ----------------------------------------------------------------------- |
| 264 | |
| 265 | # Here is the final static library that apps can link against. |
| 266 | include $(CLEAR_VARS) |
| 267 | LOCAL_USE_AAPT2 := true |
| 268 | LOCAL_MODULE := android-support-compat |
| 269 | LOCAL_SDK_VERSION := 4 |
| 270 | LOCAL_AIDL_INCLUDES := frameworks/support/v4/java |
| 271 | LOCAL_SRC_FILES := $(call all-java-files-under, java) \ |
| 272 | $(call all-Iaidl-files-under, java) |
| 273 | LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res |
| 274 | LOCAL_STATIC_JAVA_LIBRARIES += android-support-compat-api24 |
| 275 | LOCAL_JAR_EXCLUDE_FILES := none |
| 276 | LOCAL_JAVA_LANGUAGE_VERSION := 1.7 |
| 277 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 278 | |
| 279 | support_module_src_files += $(LOCAL_SRC_FILES) |
| 280 | support_module_aidl_includes := $(LOCAL_AIDL_INCLUDES) |
| 281 | |
| 282 | # API Check |
| 283 | # --------------------------------------------- |
| 284 | support_module := $(LOCAL_MODULE) |
| 285 | support_module_api_dir := $(LOCAL_PATH)/api |
| 286 | support_module_java_packages := android.support.v4.* |
| 287 | include $(SUPPORT_API_CHECK) |