1# 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 17# Android libraries referenced by this module's resources. 18resource_libs := \ 19 android-support-v17-leanback \ 20 android-support-v14-preference \ 21 android-support-v7-preference \ 22 android-support-v7-appcompat \ 23 android-support-v7-recyclerview 24 25# Build the resources using the latest applicable SDK version. 26# We do this here because the final static library must be compiled with an older 27# SDK version than the resources. The resources library and the R class that it 28# contains will not be linked into the final static library. 29include $(CLEAR_VARS) 30LOCAL_USE_AAPT2 := true 31LOCAL_MODULE := android-support-v17-preference-leanback-res 32LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 33LOCAL_SRC_FILES := $(call all-java-files-under, dummy) 34LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 35LOCAL_SHARED_ANDROID_LIBRARIES := $(resource_libs) 36LOCAL_JAVA_LANGUAGE_VERSION := 1.7 37LOCAL_JAR_EXCLUDE_FILES := none 38include $(BUILD_STATIC_JAVA_LIBRARY) 39 40# ----------------------------------------------------------------------- 41 42# A helper sub-library that makes direct use of API 21. 43include $(CLEAR_VARS) 44LOCAL_MODULE := android-support-v17-preference-leanback-api21 45LOCAL_SDK_VERSION := 21 46LOCAL_SRC_FILES := $(call all-java-files-under, api21) 47LOCAL_JAVA_LIBRARIES := \ 48 android-support-v17-preference-leanback-res \ 49 android-support-v17-leanback 50LOCAL_JAVA_LANGUAGE_VERSION := 1.7 51include $(BUILD_STATIC_JAVA_LIBRARY) 52 53# Here is the final static library that apps can link against. 54# Applications that use this library must specify 55# 56# LOCAL_STATIC_ANDROID_LIBRARIES := \ 57# android-support-v17-preference-leanback \ 58# android-support-v17-leanback \ 59# android-support-v14-preference \ 60# android-support-v7-preference \ 61# android-support-v7-appcompat \ 62# android-support-v7-recyclerview \ 63# android-support-v4 \ 64# android-support-annotions 65# 66# in their makefiles to include the resources in their package. 67include $(CLEAR_VARS) 68LOCAL_USE_AAPT2 := true 69LOCAL_MODULE := android-support-v17-preference-leanback 70LOCAL_SDK_VERSION := 17 71LOCAL_SDK_RES_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 72LOCAL_SRC_FILES := $(call all-java-files-under,src) 73LOCAL_STATIC_JAVA_LIBRARIES := \ 74 android-support-v17-preference-leanback-api21 75LOCAL_STATIC_ANDROID_LIBRARIES := \ 76 android-support-v17-preference-leanback-res 77LOCAL_SHARED_ANDROID_LIBRARIES := \ 78 $(resource_libs) \ 79 android-support-v4 \ 80 android-support-annotations 81LOCAL_JAR_EXCLUDE_FILES := none 82LOCAL_JAVA_LANGUAGE_VERSION := 1.7 83LOCAL_AAPT_FLAGS := --add-javadoc-annotation doconly 84include $(BUILD_STATIC_JAVA_LIBRARY) 85