blob: 744abaa2a61ab4848e71ea492deb37fee7e664d3 [file] [log] [blame]
Chris Banes19b2eea2015-01-27 11:07:52 +00001# 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
15LOCAL_PATH := $(call my-dir)
16
Adam Lesinski6759b102016-02-24 19:57:25 -080017# Android libraries referenced by this module's resources.
18resource_libs := \
19 android-support-v7-appcompat \
20 android-support-v7-recyclerview
21
Chris Banes82b55492016-01-22 11:11:47 +000022# Build the resources using the latest applicable SDK version.
Chris Banes19b2eea2015-01-27 11:07:52 +000023# 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.
26include $(CLEAR_VARS)
Adam Lesinski6759b102016-02-24 19:57:25 -080027LOCAL_USE_AAPT2 := true
Chris Banes19b2eea2015-01-27 11:07:52 +000028LOCAL_MODULE := android-support-design-res
Chris Banes82b55492016-01-22 11:11:47 +000029LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)
Chris Banes19b2eea2015-01-27 11:07:52 +000030LOCAL_SRC_FILES := $(call all-java-files-under, dummy)
Adam Lesinski6759b102016-02-24 19:57:25 -080031LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
32LOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs)
33LOCAL_AAPT_FLAGS := --no-version-vectors
Chris Banes19b2eea2015-01-27 11:07:52 +000034LOCAL_JAR_EXCLUDE_FILES := none
Neil Fullere1cd5a12016-02-25 11:41:17 +000035LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Chris Banes19b2eea2015-01-27 11:07:52 +000036include $(BUILD_STATIC_JAVA_LIBRARY)
37
Chris Banes95ad49b2015-10-19 11:02:33 +010038support_module_src_files := $(LOCAL_SRC_FILES)
39
Chris Banes19b2eea2015-01-27 11:07:52 +000040# A helper sub-library to resolve cyclic dependencies between src and the platform dependent
41# implementations
42include $(CLEAR_VARS)
43LOCAL_MODULE := android-support-design-base
Kirill Grouchnikov529cd212016-05-11 16:45:59 -070044LOCAL_SDK_VERSION := 9
Chris Banes19b2eea2015-01-27 11:07:52 +000045LOCAL_SRC_FILES := $(call all-java-files-under, base)
Adam Lesinski6759b102016-02-24 19:57:25 -080046LOCAL_JAVA_LIBRARIES := \
47 android-support-design-res \
Chris Banes19b2eea2015-01-27 11:07:52 +000048 android-support-v4 \
Yuichi Araki64bcb672015-09-03 10:25:04 +000049 android-support-v7-appcompat \
50 android-support-v7-recyclerview
Neil Fullere1cd5a12016-02-25 11:41:17 +000051LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Chris Banes19b2eea2015-01-27 11:07:52 +000052include $(BUILD_STATIC_JAVA_LIBRARY)
53
Chris Banes95ad49b2015-10-19 11:02:33 +010054support_module_src_files += $(LOCAL_SRC_FILES)
55
Kirill Grouchnikovf4893cf2016-05-10 11:02:58 -070056# A helper sub-library that makes direct use of Gingerbread APIs
Chris Banes19b2eea2015-01-27 11:07:52 +000057include $(CLEAR_VARS)
Kirill Grouchnikovf4893cf2016-05-10 11:02:58 -070058LOCAL_MODULE := android-support-design-gingerbread
Kirill Grouchnikov529cd212016-05-11 16:45:59 -070059LOCAL_SDK_VERSION := 9
Kirill Grouchnikovf4893cf2016-05-10 11:02:58 -070060LOCAL_SRC_FILES := $(call all-java-files-under, gingerbread)
Chris Banes19b2eea2015-01-27 11:07:52 +000061LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-base
Adam Lesinski6759b102016-02-24 19:57:25 -080062LOCAL_JAVA_LIBRARIES := \
63 android-support-design-res \
Chris Banes19b2eea2015-01-27 11:07:52 +000064 android-support-v4 \
Yuichi Araki64bcb672015-09-03 10:25:04 +000065 android-support-v7-appcompat \
66 android-support-v7-recyclerview
Neil Fullere1cd5a12016-02-25 11:41:17 +000067LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Chris Banes19b2eea2015-01-27 11:07:52 +000068include $(BUILD_STATIC_JAVA_LIBRARY)
69
Chris Banes95ad49b2015-10-19 11:02:33 +010070support_module_src_files += $(LOCAL_SRC_FILES)
71
Adam Powella966c6c2015-02-04 18:25:49 -080072# A helper sub-library that makes direct use of Honeycomb APIs
73include $(CLEAR_VARS)
74LOCAL_MODULE := android-support-design-honeycomb
75LOCAL_SDK_VERSION := 11
76LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb)
Kirill Grouchnikovf4893cf2016-05-10 11:02:58 -070077LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-gingerbread
Adam Lesinski6759b102016-02-24 19:57:25 -080078LOCAL_JAVA_LIBRARIES := \
79 android-support-design-res \
Adam Powella966c6c2015-02-04 18:25:49 -080080 android-support-v4 \
Yuichi Araki64bcb672015-09-03 10:25:04 +000081 android-support-v7-appcompat \
82 android-support-v7-recyclerview
Neil Fullere1cd5a12016-02-25 11:41:17 +000083LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Adam Powella966c6c2015-02-04 18:25:49 -080084include $(BUILD_STATIC_JAVA_LIBRARY)
85
Chris Banes95ad49b2015-10-19 11:02:33 +010086support_module_src_files += $(LOCAL_SRC_FILES)
87
Chris Banes631f64e2015-04-10 10:46:13 +010088# A helper sub-library that makes direct use of Honeycomb MR1 APIs
89include $(CLEAR_VARS)
90LOCAL_MODULE := android-support-design-honeycomb-mr1
91LOCAL_SDK_VERSION := 12
92LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb-mr1)
93LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb
Adam Lesinski6759b102016-02-24 19:57:25 -080094LOCAL_JAVA_LIBRARIES := \
95 android-support-design-res \
Chris Banes631f64e2015-04-10 10:46:13 +010096 android-support-v4 \
Yuichi Araki64bcb672015-09-03 10:25:04 +000097 android-support-v7-appcompat \
98 android-support-v7-recyclerview
Neil Fullere1cd5a12016-02-25 11:41:17 +000099LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Chris Banes631f64e2015-04-10 10:46:13 +0100100include $(BUILD_STATIC_JAVA_LIBRARY)
101
Chris Banes95ad49b2015-10-19 11:02:33 +0100102support_module_src_files += $(LOCAL_SRC_FILES)
103
Chris Banes9ec922c2015-10-19 09:41:05 +0100104# A helper sub-library that makes direct use of ICS APIs
105include $(CLEAR_VARS)
106LOCAL_MODULE := android-support-design-ics
107LOCAL_SDK_VERSION := 14
108LOCAL_SRC_FILES := $(call all-java-files-under, ics)
109LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb-mr1
Adam Lesinski6759b102016-02-24 19:57:25 -0800110LOCAL_JAVA_LIBRARIES := \
111 android-support-design-res \
Chris Banes9ec922c2015-10-19 09:41:05 +0100112 android-support-v4 \
113 android-support-v7-appcompat \
114 android-support-v7-recyclerview
Neil Fullere1cd5a12016-02-25 11:41:17 +0000115LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Chris Banes9ec922c2015-10-19 09:41:05 +0100116include $(BUILD_STATIC_JAVA_LIBRARY)
117
Chris Banes95ad49b2015-10-19 11:02:33 +0100118support_module_src_files += $(LOCAL_SRC_FILES)
119
Chris Banes19b2eea2015-01-27 11:07:52 +0000120# A helper sub-library that makes direct use of Lollipop APIs
121include $(CLEAR_VARS)
122LOCAL_MODULE := android-support-design-lollipop
123LOCAL_SDK_VERSION := 21
124LOCAL_SRC_FILES := $(call all-java-files-under, lollipop)
Chris Banes9ec922c2015-10-19 09:41:05 +0100125LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-ics
Adam Lesinski6759b102016-02-24 19:57:25 -0800126LOCAL_JAVA_LIBRARIES := \
127 android-support-design-res \
Chris Banes19b2eea2015-01-27 11:07:52 +0000128 android-support-v4 \
Yuichi Araki64bcb672015-09-03 10:25:04 +0000129 android-support-v7-appcompat \
130 android-support-v7-recyclerview
Neil Fullere1cd5a12016-02-25 11:41:17 +0000131LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Chris Banes19b2eea2015-01-27 11:07:52 +0000132include $(BUILD_STATIC_JAVA_LIBRARY)
133
Chris Banes95ad49b2015-10-19 11:02:33 +0100134support_module_src_files += $(LOCAL_SRC_FILES)
135
Chris Banes19b2eea2015-01-27 11:07:52 +0000136# Here is the final static library that apps can link against.
Adam Lesinski6759b102016-02-24 19:57:25 -0800137# 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 Banes19b2eea2015-01-27 11:07:52 +0000146include $(CLEAR_VARS)
Adam Lesinski6759b102016-02-24 19:57:25 -0800147LOCAL_USE_AAPT2 := true
Chris Banes19b2eea2015-01-27 11:07:52 +0000148LOCAL_MODULE := android-support-design
Chris Banes82b55492016-01-22 11:11:47 +0000149LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)
Chris Banes19b2eea2015-01-27 11:07:52 +0000150LOCAL_SRC_FILES := $(call all-java-files-under, src)
151LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-lollipop
Adam Lesinski6759b102016-02-24 19:57:25 -0800152LOCAL_STATIC_ANDROID_LIBRARIES := android-support-design-res
153LOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs) android-support-v4
154LOCAL_JAR_EXCLUDE_FILES := none
Neil Fullere1cd5a12016-02-25 11:41:17 +0000155LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Adam Lesinski6759b102016-02-24 19:57:25 -0800156LOCAL_AAPT_FLAGS := --add-javadoc-annotation doconly
Chris Banes19b2eea2015-01-27 11:07:52 +0000157include $(BUILD_STATIC_JAVA_LIBRARY)
Chris Banes27238d12015-04-01 15:44:41 +0100158
Chris Banes95ad49b2015-10-19 11:02:33 +0100159support_module_src_files += $(LOCAL_SRC_FILES)
160
Chris Banes27238d12015-04-01 15:44:41 +0100161# API Check
162# ---------------------------------------------
163support_module := $(LOCAL_MODULE)
164support_module_api_dir := $(LOCAL_PATH)/api
Chris Banes27238d12015-04-01 15:44:41 +0100165support_module_java_libraries := $(LOCAL_JAVA_LIBRARIES)
Chris Banes63964052015-04-30 10:37:19 +0100166support_module_java_packages := android.support.design.*
Chris Banes27238d12015-04-01 15:44:41 +0100167include $(SUPPORT_API_CHECK)