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 40support_module_src_files := $(LOCAL_SRC_FILES) 41 42# ----------------------------------------------------------------------- 43 44# A helper sub-library that makes direct use of API 21. 45include $(CLEAR_VARS) 46LOCAL_MODULE := android-support-v17-preference-leanback-api21 47LOCAL_SDK_VERSION := 21 48LOCAL_SRC_FILES := $(call all-java-files-under, api21) 49LOCAL_JAVA_LIBRARIES := \ 50 android-support-v17-preference-leanback-res \ 51 android-support-v17-leanback 52LOCAL_JAVA_LANGUAGE_VERSION := 1.7 53include $(BUILD_STATIC_JAVA_LIBRARY) 54 55support_module_src_files += $(LOCAL_SRC_FILES) 56 57# Here is the final static library that apps can link against. 58# Applications that use this library must specify 59# 60# LOCAL_STATIC_ANDROID_LIBRARIES := \ 61# android-support-v17-preference-leanback \ 62# android-support-v17-leanback \ 63# android-support-v14-preference \ 64# android-support-v7-preference \ 65# android-support-v7-appcompat \ 66# android-support-v7-recyclerview \ 67# android-support-v4 \ 68# android-support-annotions 69# 70# in their makefiles to include the resources in their package. 71include $(CLEAR_VARS) 72LOCAL_USE_AAPT2 := true 73LOCAL_MODULE := android-support-v17-preference-leanback 74LOCAL_SDK_VERSION := 17 75LOCAL_SDK_RES_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 76LOCAL_SRC_FILES := $(call all-java-files-under,src) 77LOCAL_STATIC_JAVA_LIBRARIES := \ 78 android-support-v17-preference-leanback-api21 79LOCAL_STATIC_ANDROID_LIBRARIES := \ 80 android-support-v17-preference-leanback-res 81LOCAL_SHARED_ANDROID_LIBRARIES := \ 82 $(resource_libs) \ 83 android-support-v4 \ 84 android-support-annotations 85LOCAL_JAR_EXCLUDE_FILES := none 86LOCAL_JAVA_LANGUAGE_VERSION := 1.7 87LOCAL_AAPT_FLAGS := --add-javadoc-annotation doconly 88include $(BUILD_STATIC_JAVA_LIBRARY) 89 90support_module_src_files += $(LOCAL_SRC_FILES) 91 92# API Check 93# --------------------------------------------- 94support_module := $(LOCAL_MODULE) 95support_module_api_dir := $(LOCAL_PATH)/api 96support_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) 97support_module_java_packages := android.support.v17.preference 98include $(SUPPORT_API_CHECK) 99