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
176759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski# Android libraries referenced by this module's resources.
186759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinskiresource_libs := \
196759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski    android-support-v7-appcompat \
206759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski    android-support-v7-recyclerview
216759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski
2282b55491586ac50a0f95b60e39a3c18d068941cfChris Banes# Build the resources using the latest applicable SDK version.
2319b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# We do this here because the final static library must be compiled with an older
2419b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# SDK version than the resources.  The resources library and the R class that it
2519b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# contains will not be linked into the final static library.
2619b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS)
276759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_USE_AAPT2 := true
2819b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_MODULE := android-support-design-res
2982b55491586ac50a0f95b60e39a3c18d068941cfChris BanesLOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)
3019b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, dummy)
316759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
326759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs)
336759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_AAPT_FLAGS := --no-version-vectors
3419b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_JAR_EXCLUDE_FILES := none
35e1cd5a1f80010eece43cb4608505fd39f4832c00Neil FullerLOCAL_JAVA_LANGUAGE_VERSION := 1.7
3619b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY)
3719b2eeafda0769c523c1cef0971cc79dcca49d60Chris 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
42529cd2167c1db38f878d476b455bf61097378ba8Kirill GrouchnikovLOCAL_SDK_VERSION := 9
4319b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, base)
446759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_JAVA_LIBRARIES := \
456759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski    android-support-design-res \
4619b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes    android-support-v4 \
4764bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-appcompat \
4864bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-recyclerview
49e1cd5a1f80010eece43cb4608505fd39f4832c00Neil FullerLOCAL_JAVA_LANGUAGE_VERSION := 1.7
5019b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY)
5119b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes
52f4893cfe0dd5314e8c7835e6c7c3907c8765faf8Kirill Grouchnikov# A helper sub-library that makes direct use of Gingerbread APIs
5319b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS)
54f4893cfe0dd5314e8c7835e6c7c3907c8765faf8Kirill GrouchnikovLOCAL_MODULE := android-support-design-gingerbread
55529cd2167c1db38f878d476b455bf61097378ba8Kirill GrouchnikovLOCAL_SDK_VERSION := 9
56f4893cfe0dd5314e8c7835e6c7c3907c8765faf8Kirill GrouchnikovLOCAL_SRC_FILES := $(call all-java-files-under, gingerbread)
5719b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-base
586759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_JAVA_LIBRARIES := \
596759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski    android-support-design-res \
6019b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes    android-support-v4 \
6164bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-appcompat \
6264bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-recyclerview
63e1cd5a1f80010eece43cb4608505fd39f4832c00Neil FullerLOCAL_JAVA_LANGUAGE_VERSION := 1.7
6419b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY)
6519b2eeafda0769c523c1cef0971cc79dcca49d60Chris 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)
71f4893cfe0dd5314e8c7835e6c7c3907c8765faf8Kirill GrouchnikovLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-gingerbread
726759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_JAVA_LIBRARIES := \
736759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski    android-support-design-res \
74a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam Powell    android-support-v4 \
7564bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-appcompat \
7664bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-recyclerview
77e1cd5a1f80010eece43cb4608505fd39f4832c00Neil FullerLOCAL_JAVA_LANGUAGE_VERSION := 1.7
78a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam Powellinclude $(BUILD_STATIC_JAVA_LIBRARY)
79a966c6cda6a3aa562fcfdb842b6c6b35bdd6a3dcAdam Powell
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
866759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_JAVA_LIBRARIES := \
876759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski    android-support-design-res \
88631f64ec9c6255f38a7f746d7949b6a537c1180fChris Banes    android-support-v4 \
8964bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-appcompat \
9064bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-recyclerview
91e1cd5a1f80010eece43cb4608505fd39f4832c00Neil FullerLOCAL_JAVA_LANGUAGE_VERSION := 1.7
92631f64ec9c6255f38a7f746d7949b6a537c1180fChris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY)
93631f64ec9c6255f38a7f746d7949b6a537c1180fChris 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
1006759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_JAVA_LIBRARIES := \
1016759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski    android-support-design-res \
1029ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banes    android-support-v4 \
1039ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banes    android-support-v7-appcompat \
1043cc432a5bd723a79dc52438235b47d0ea5d41ae4Aurimas Liutikas    android-support-v7-recyclerview \
1053cc432a5bd723a79dc52438235b47d0ea5d41ae4Aurimas Liutikas    android-support-transition
106e1cd5a1f80010eece43cb4608505fd39f4832c00Neil FullerLOCAL_JAVA_LANGUAGE_VERSION := 1.7
1079ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY)
1089ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris Banes
10919b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# A helper sub-library that makes direct use of Lollipop APIs
11019b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS)
11119b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_MODULE := android-support-design-lollipop
11219b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SDK_VERSION := 21
11319b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, lollipop)
1149ec922c215ed95a4bbd8bd7940e81dcfe6926893Chris BanesLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-ics
1156759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_JAVA_LIBRARIES := \
1166759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski    android-support-design-res \
11719b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes    android-support-v4 \
11864bcb674cc45ab712a591d4f540d5c13404f3b83Yuichi Araki    android-support-v7-appcompat \
1193cc432a5bd723a79dc52438235b47d0ea5d41ae4Aurimas Liutikas    android-support-v7-recyclerview \
1203cc432a5bd723a79dc52438235b47d0ea5d41ae4Aurimas Liutikas    android-support-transition
121e1cd5a1f80010eece43cb4608505fd39f4832c00Neil FullerLOCAL_JAVA_LANGUAGE_VERSION := 1.7
12219b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY)
12319b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes
12419b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banes# Here is the final static library that apps can link against.
1256759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski# Applications that use this library must specify
1266759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski#
1276759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski#   LOCAL_STATIC_ANDROID_LIBRARIES := \
1286759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski#       android-support-design \
1296759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski#       android-support-v7-appcompat \
1306759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski#       android-support-v7-recyclerview \
1316759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski#       android-support-v4
1326759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski#
1336759b1021d8198ad1d239bb30e5a102b99624bceAdam Lesinski# in their makefiles to include the resources and their dependencies in their package.
13419b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(CLEAR_VARS)
1356759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_USE_AAPT2 := true
13619b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_MODULE := android-support-design
13782b55491586ac50a0f95b60e39a3c18d068941cfChris BanesLOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)
13819b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_SRC_FILES := $(call all-java-files-under, src)
13919b2eeafda0769c523c1cef0971cc79dcca49d60Chris BanesLOCAL_STATIC_JAVA_LIBRARIES := android-support-design-lollipop
1406759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_STATIC_ANDROID_LIBRARIES := android-support-design-res
1416759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs) android-support-v4
1426759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_JAR_EXCLUDE_FILES := none
143e1cd5a1f80010eece43cb4608505fd39f4832c00Neil FullerLOCAL_JAVA_LANGUAGE_VERSION := 1.7
1446759b1021d8198ad1d239bb30e5a102b99624bceAdam LesinskiLOCAL_AAPT_FLAGS := --add-javadoc-annotation doconly
14519b2eeafda0769c523c1cef0971cc79dcca49d60Chris Banesinclude $(BUILD_STATIC_JAVA_LIBRARY)
146