Android.mk revision 82b55491586ac50a0f95b60e39a3c18d068941cf
119b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# Copyright (C) 2015 The Android Open Source Project 219b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# 319b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# Licensed under the Apache License, Version 2.0 (the "License"); 419b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# you may not use this file except in compliance with the License. 519b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# You may obtain a copy of the License at 619b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# 719b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# http://www.apache.org/licenses/LICENSE-2.0 819b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# 919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# Unless required by applicable law or agreed to in writing, software 1019b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# distributed under the License is distributed on an "AS IS" BASIS, 1119b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1219b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# See the License for the specific language governing permissions and 1319b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# limitations under the License. 1419b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes 1519b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_PATH := $(call my-dir) 1619b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes 1782b55491586ac50a0f95b60e39a3c18d068941cfChris Banes# Build the resources using the latest applicable SDK version. 1819b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# We do this here because the final static library must be compiled with an older 1919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# SDK version than the resources. The resources library and the R class that it 2019b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# contains will not be linked into the final static library. 2119b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS) 2219b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_MODULE := android-support-design-res 2382b55491586ac50a0f95b60e39a3c18d068941cfChris BanesLOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 2419b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, dummy) 2519b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \ 2664bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki frameworks/support/v7/appcompat/res \ 2764bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki frameworks/support/v7/recyclerview/res 2819b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_AAPT_FLAGS := \ 2919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes --auto-add-overlay \ 3064bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki --extra-packages android.support.v7.appcompat \ 31394c4272d0e220cf7af236665eecaf99dfed25b1Kirill Grouchnikov --extra-packages android.support.v7.recyclerview \ 32394c4272d0e220cf7af236665eecaf99dfed25b1Kirill Grouchnikov --no-version-vectors 3319b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_JAR_EXCLUDE_FILES := none 3419b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY) 3519b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes 3695ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banessupport_module_src_files := $(LOCAL_SRC_FILES) 3795ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banes 3819b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# A helper sub-library to resolve cyclic dependencies between src and the platform dependent 3919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# implementations 4019b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS) 4119b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_MODULE := android-support-design-base 4219b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SDK_VERSION := 7 4319b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, base) 4419b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_JAVA_LIBRARIES := android-support-design-res \ 4519b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes android-support-v4 \ 4664bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-appcompat \ 4764bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-recyclerview 4819b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY) 4919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes 5095ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banessupport_module_src_files += $(LOCAL_SRC_FILES) 5195ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banes 5219b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# A helper sub-library that makes direct use of Eclair MR1 APIs 5319b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS) 5419b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_MODULE := android-support-design-eclair-mr1 5519b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SDK_VERSION := 7 5619b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, eclair-mr1) 5719b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-base 5819b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_JAVA_LIBRARIES := android-support-design-res \ 5919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes android-support-v4 \ 6064bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-appcompat \ 6164bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-recyclerview 6219b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY) 6319b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes 6495ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banessupport_module_src_files += $(LOCAL_SRC_FILES) 6595ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banes 66a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam Powell# A helper sub-library that makes direct use of Honeycomb APIs 67a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam Powellinclude $(CLEAR_VARS) 68a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam PowellLOCAL_MODULE := android-support-design-honeycomb 69a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam PowellLOCAL_SDK_VERSION := 11 70a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam PowellLOCAL_SRC_FILES := $(call all-java-files-under, honeycomb) 71a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam PowellLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-eclair-mr1 72a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam PowellLOCAL_JAVA_LIBRARIES := android-support-design-res \ 73a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam Powell android-support-v4 \ 7464bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-appcompat \ 7564bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-recyclerview 76a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam Powellinclude $(BUILD_STATIC_JAVA_LIBRARY) 77a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam Powell 7895ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banessupport_module_src_files += $(LOCAL_SRC_FILES) 7995ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banes 80631f64ec9c6255f38a7f746d7949b6a537c1180fChris Banes# A helper sub-library that makes direct use of Honeycomb MR1 APIs 81631f64ec9c6255f38a7f746d7949b6a537c1180fChris Banesinclude $(CLEAR_VARS) 82631f64ec9c6255f38a7f746d7949b6a537c1180fChris BanesLOCAL_MODULE := android-support-design-honeycomb-mr1 83631f64ec9c6255f38a7f746d7949b6a537c1180fChris BanesLOCAL_SDK_VERSION := 12 84631f64ec9c6255f38a7f746d7949b6a537c1180fChris BanesLOCAL_SRC_FILES := $(call all-java-files-under, honeycomb-mr1) 85631f64ec9c6255f38a7f746d7949b6a537c1180fChris BanesLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb 86631f64ec9c6255f38a7f746d7949b6a537c1180fChris BanesLOCAL_JAVA_LIBRARIES := android-support-design-res \ 87631f64ec9c6255f38a7f746d7949b6a537c1180fChris Banes android-support-v4 \ 8864bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-appcompat \ 8964bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-recyclerview 90631f64ec9c6255f38a7f746d7949b6a537c1180fChris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY) 91631f64ec9c6255f38a7f746d7949b6a537c1180fChris Banes 9295ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banessupport_module_src_files += $(LOCAL_SRC_FILES) 9395ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banes 949ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banes# A helper sub-library that makes direct use of ICS APIs 959ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banesinclude $(CLEAR_VARS) 969ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris BanesLOCAL_MODULE := android-support-design-ics 979ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris BanesLOCAL_SDK_VERSION := 14 989ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, ics) 999ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris BanesLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb-mr1 1009ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris BanesLOCAL_JAVA_LIBRARIES := android-support-design-res \ 1019ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banes android-support-v4 \ 1029ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banes android-support-v7-appcompat \ 1039ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banes android-support-v7-recyclerview 1049ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY) 1059ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banes 10695ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banessupport_module_src_files += $(LOCAL_SRC_FILES) 10795ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banes 10819b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# A helper sub-library that makes direct use of Lollipop APIs 10919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS) 11019b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_MODULE := android-support-design-lollipop 11119b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SDK_VERSION := 21 11219b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, lollipop) 1139ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris BanesLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-ics 11419b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_JAVA_LIBRARIES := android-support-design-res \ 11519b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes android-support-v4 \ 11664bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-appcompat \ 11764bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-recyclerview 11819b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY) 11919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes 12095ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banessupport_module_src_files += $(LOCAL_SRC_FILES) 12195ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banes 12219b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# Here is the final static library that apps can link against. 12319b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# The R class is automatically excluded from the generated library. 12419b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# Applications that use this library must specify LOCAL_RESOURCE_DIR 12519b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# in their makefiles to include the resources in their package. 12619b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS) 12719b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_MODULE := android-support-design 12882b55491586ac50a0f95b60e39a3c18d068941cfChris BanesLOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 12919b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, src) 13019b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-lollipop 13119b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_JAVA_LIBRARIES := android-support-design-res \ 13219b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes android-support-v4 \ 13364bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-appcompat \ 13464bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki android-support-v7-recyclerview 13519b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY) 13627238d142f178f9dc071f4bd8e1e7195231b5957Chris Banes 13795ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banessupport_module_src_files += $(LOCAL_SRC_FILES) 13895ad49b720f4990d39d05f7e46a5c7bc83afc9d6Chris Banes 13927238d142f178f9dc071f4bd8e1e7195231b5957Chris Banes# API Check 14027238d142f178f9dc071f4bd8e1e7195231b5957Chris Banes# --------------------------------------------- 14127238d142f178f9dc071f4bd8e1e7195231b5957Chris Banessupport_module := $(LOCAL_MODULE) 14227238d142f178f9dc071f4bd8e1e7195231b5957Chris Banessupport_module_api_dir := $(LOCAL_PATH)/api 14327238d142f178f9dc071f4bd8e1e7195231b5957Chris Banessupport_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) 144639640523bdb81cc5a2ac2a1ebbe0c4e13a2c82bChris Banessupport_module_java_packages := android.support.design.* 14527238d142f178f9dc071f4bd8e1e7195231b5957Chris Banesinclude $(SUPPORT_API_CHECK) 146