blob: 7fa5cec5f8b2f0e589fce62d32608d9d6c8f2888 [file] [log] [blame]
Yigit Boyar83b85262014-05-15 20:50:24 -07001# Copyright (C) 2014 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
Chris Banes82b55492016-01-22 11:11:47 +000017# Build the resources using the latest applicable SDK version.
Yigit Boyar83b85262014-05-15 20:50:24 -070018# We do this here because the final static library must be compiled with an older
19# SDK version than the resources. The resources library and the R class that it
20# contains will not be linked into the final static library.
21include $(CLEAR_VARS)
22LOCAL_MODULE := android-support-v7-cardview-res
Chris Banes82b55492016-01-22 11:11:47 +000023LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION)
Yigit Boyar83b85262014-05-15 20:50:24 -070024LOCAL_SRC_FILES := $(call all-java-files-under, dummy)
25LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
26LOCAL_JAR_EXCLUDE_FILES := none
Neil Fullere1cd5a12016-02-25 11:41:17 +000027LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Yigit Boyar83b85262014-05-15 20:50:24 -070028include $(BUILD_STATIC_JAVA_LIBRARY)
29
Chris Banes95ad49b2015-10-19 11:02:33 +010030support_module_src_files := $(LOCAL_SRC_FILES)
31
Yigit Boyar83b85262014-05-15 20:50:24 -070032# A helper sub-library to resolve cyclic dependencies between CardView and platform dependent
33# implementations
34include $(CLEAR_VARS)
35LOCAL_MODULE := android-support-v7-cardview-base
36LOCAL_SDK_VERSION := 7
37LOCAL_SRC_FILES := $(call all-java-files-under, base)
Aurimas Liutikasd2c60292016-03-02 18:18:53 -080038LOCAL_JAVA_LIBRARIES := android-support-annotations
Neil Fullere1cd5a12016-02-25 11:41:17 +000039LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Yigit Boyar83b85262014-05-15 20:50:24 -070040include $(BUILD_STATIC_JAVA_LIBRARY)
41
Chris Banes95ad49b2015-10-19 11:02:33 +010042support_module_src_files += $(LOCAL_SRC_FILES)
43
Yigit Boyar83b85262014-05-15 20:50:24 -070044# A helper sub-library that makes direct use of Eclair MR1 APIs
45include $(CLEAR_VARS)
46LOCAL_MODULE := android-support-v7-cardview-eclair-mr1
47LOCAL_SDK_VERSION := 7
48LOCAL_SRC_FILES := $(call all-java-files-under, eclair-mr1)
49LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-cardview-base
Aurimas Liutikasd2c60292016-03-02 18:18:53 -080050LOCAL_JAVA_LIBRARIES := android-support-v7-cardview-res \
51 android-support-annotations
Neil Fullere1cd5a12016-02-25 11:41:17 +000052LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Yigit Boyar83b85262014-05-15 20:50:24 -070053include $(BUILD_STATIC_JAVA_LIBRARY)
54
Chris Banes95ad49b2015-10-19 11:02:33 +010055support_module_src_files += $(LOCAL_SRC_FILES)
56
Yigit Boyar83b85262014-05-15 20:50:24 -070057# A helper sub-library that makes direct use of JB MR1 APIs
58include $(CLEAR_VARS)
59LOCAL_MODULE := android-support-v7-cardview-jellybean-mr1
60LOCAL_SDK_VERSION := 17
61LOCAL_SRC_FILES := $(call all-java-files-under, jellybean-mr1)
62LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-cardview-eclair-mr1
Aurimas Liutikasd2c60292016-03-02 18:18:53 -080063LOCAL_JAVA_LIBRARIES := android-support-v7-cardview-res \
64 android-support-annotations
Neil Fullere1cd5a12016-02-25 11:41:17 +000065LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Yigit Boyar83b85262014-05-15 20:50:24 -070066include $(BUILD_STATIC_JAVA_LIBRARY)
67
Chris Banes95ad49b2015-10-19 11:02:33 +010068support_module_src_files += $(LOCAL_SRC_FILES)
69
Yigit Boyar83b85262014-05-15 20:50:24 -070070# A helper sub-library that makes direct use of L APIs
71include $(CLEAR_VARS)
72LOCAL_MODULE := android-support-v7-cardview-api21
Griff Hazenfcec1282014-11-18 12:35:04 -080073LOCAL_SDK_VERSION := 21
Yigit Boyar83b85262014-05-15 20:50:24 -070074LOCAL_SRC_FILES := $(call all-java-files-under, api21)
Adam Lesinski57f39182016-04-01 22:13:17 +000075LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-cardview-base \
76 android-support-v7-cardview-jellybean-mr1
77LOCAL_JAVA_LIBRARIES := android-support-v7-cardview-res \
Aurimas Liutikasd2c60292016-03-02 18:18:53 -080078 android-support-annotations
Neil Fullere1cd5a12016-02-25 11:41:17 +000079LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Yigit Boyar83b85262014-05-15 20:50:24 -070080include $(BUILD_STATIC_JAVA_LIBRARY)
81
Chris Banes95ad49b2015-10-19 11:02:33 +010082support_module_src_files += $(LOCAL_SRC_FILES)
83
Yigit Boyar83b85262014-05-15 20:50:24 -070084# Here is the final static library that apps can link against.
Adam Lesinski57f39182016-04-01 22:13:17 +000085# The R class is automatically excluded from the generated library.
86# Applications that use this library must specify LOCAL_RESOURCE_DIR
Yigit Boyar83b85262014-05-15 20:50:24 -070087# in their makefiles to include the resources in their package.
88include $(CLEAR_VARS)
89LOCAL_MODULE := android-support-v7-cardview
90LOCAL_SDK_VERSION := 7
91LOCAL_SRC_FILES := $(call all-java-files-under,src)
92LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-cardview-api21
Adam Lesinski57f39182016-04-01 22:13:17 +000093LOCAL_JAVA_LIBRARIES := android-support-v7-cardview-res \
94 android-support-annotations
Neil Fullere1cd5a12016-02-25 11:41:17 +000095LOCAL_JAVA_LANGUAGE_VERSION := 1.7
Yigit Boyar83b85262014-05-15 20:50:24 -070096include $(BUILD_STATIC_JAVA_LIBRARY)
Chris Banesf62fcde2015-02-25 10:42:47 +000097
Chris Banes95ad49b2015-10-19 11:02:33 +010098support_module_src_files += $(LOCAL_SRC_FILES)
99
Chris Banesf62fcde2015-02-25 10:42:47 +0000100# API Check
101# ---------------------------------------------
102support_module := $(LOCAL_MODULE)
103support_module_api_dir := $(LOCAL_PATH)/api
Chris Banes95ad49b2015-10-19 11:02:33 +0100104support_module_java_libraries := $(LOCAL_JAVA_LIBRARIES)
Chris Banesf62fcde2015-02-25 10:42:47 +0000105support_module_java_packages := android.support.v7.widget
106include $(SUPPORT_API_CHECK)