1# Copyright (C) 2013 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# Build the resources using the latest applicable SDK version. 18# We do this here because the final static library must be compiled with an older 19# SDK version than the resources. 20include $(CLEAR_VARS) 21LOCAL_USE_AAPT2 := true 22LOCAL_MODULE := android-support-v7-mediarouter-res 23LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 24LOCAL_SRC_FILES := $(call all-java-files-under, dummy) 25LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 26LOCAL_SHARED_ANDROID_LIBRARIES := android-support-v7-appcompat 27LOCAL_JAR_EXCLUDE_FILES := none 28LOCAL_JAVA_LANGUAGE_VERSION := 1.7 29include $(BUILD_STATIC_JAVA_LIBRARY) 30 31support_module_src_files := $(LOCAL_SRC_FILES) 32 33# A helper sub-library that makes direct use of JellyBean APIs. 34include $(CLEAR_VARS) 35LOCAL_MODULE := android-support-v7-mediarouter-jellybean 36LOCAL_SDK_VERSION := 16 37LOCAL_SRC_FILES := $(call all-java-files-under, jellybean) 38LOCAL_JAVA_LANGUAGE_VERSION := 1.7 39include $(BUILD_STATIC_JAVA_LIBRARY) 40 41support_module_src_files += $(LOCAL_SRC_FILES) 42 43# A helper sub-library that makes direct use of JellyBean MR1 APIs. 44include $(CLEAR_VARS) 45LOCAL_MODULE := android-support-v7-mediarouter-jellybean-mr1 46LOCAL_SDK_VERSION := 17 47LOCAL_SRC_FILES := $(call all-java-files-under, jellybean-mr1) 48LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-mediarouter-jellybean 49LOCAL_JAVA_LANGUAGE_VERSION := 1.7 50include $(BUILD_STATIC_JAVA_LIBRARY) 51 52support_module_src_files += $(LOCAL_SRC_FILES) 53 54# A helper sub-library that makes direct use of JellyBean MR2 APIs. 55include $(CLEAR_VARS) 56LOCAL_MODULE := android-support-v7-mediarouter-jellybean-mr2 57LOCAL_SDK_VERSION := 18 58LOCAL_SRC_FILES := $(call all-java-files-under, jellybean-mr2) 59LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-mediarouter-jellybean-mr1 60LOCAL_JAVA_LANGUAGE_VERSION := 1.7 61include $(BUILD_STATIC_JAVA_LIBRARY) 62 63support_module_src_files += $(LOCAL_SRC_FILES) 64 65# A helper sub-library that makes direct use of V24 APIs. 66include $(CLEAR_VARS) 67LOCAL_MODULE := android-support-v7-mediarouter-api24 68LOCAL_SDK_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 69LOCAL_SRC_FILES := $(call all-java-files-under, api24) 70LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-mediarouter-jellybean-mr2 71LOCAL_JAVA_LANGUAGE_VERSION := 1.7 72include $(BUILD_STATIC_JAVA_LIBRARY) 73 74support_module_src_files += $(LOCAL_SRC_FILES) 75 76# Here is the final static library that apps can link against. 77# Applications that use this library must specify 78# 79# LOCAL_STATIC_ANDROID_LIBRARIES := \ 80# android-support-v7-mediarouter \ 81# android-support-v7-appcompat \ 82# android-support-v7-palette \ 83# android-support-v4 84# 85# in their makefiles to include the resources and their dependencies in their package. 86include $(CLEAR_VARS) 87LOCAL_USE_AAPT2 := true 88LOCAL_MODULE := android-support-v7-mediarouter 89LOCAL_SDK_VERSION := 7 90LOCAL_SDK_RES_VERSION := $(SUPPORT_CURRENT_SDK_VERSION) 91LOCAL_SRC_FILES := $(call all-java-files-under,src) 92LOCAL_STATIC_JAVA_LIBRARIES := android-support-v7-mediarouter-api24 93LOCAL_STATIC_ANDROID_LIBRARIES := android-support-v7-mediarouter-res 94LOCAL_SHARED_ANDROID_LIBRARIES := \ 95 android-support-v7-appcompat \ 96 android-support-v7-palette \ 97 android-support-v4 98LOCAL_JAR_EXCLUDE_FILES := none 99LOCAL_JAVA_LANGUAGE_VERSION := 1.7 100LOCAL_AAPT_FLAGS := --add-javadoc-annotation doconly 101include $(BUILD_STATIC_JAVA_LIBRARY) 102 103support_module_src_files += $(LOCAL_SRC_FILES) 104 105# API Check 106# --------------------------------------------- 107support_module := $(LOCAL_MODULE) 108support_module_api_dir := $(LOCAL_PATH)/api 109# We're asking doclava to generate stubs for android.support.v7.app in addition 110# to mediarouter, so we'll have to point doclava at the sources for 111# android.support.v7.app. Note that this API definition will overlap with that 112# of the android.support.v7.app package. 113support_module_src_files := $(LOCAL_SRC_FILES) \ 114 ../appcompat/src/android/support/v7/app/AppCompatDelegate.java \ 115 ../appcompat/src/android/support/v7/app/AppCompatCallback.java \ 116 ../appcompat/src/android/support/v7/app/AppCompatDialog.java \ 117 ../appcompat/src/android/support/v7/app/AlertDialog.java \ 118 ../appcompat/src/android/support/v7/app/ActionBar.java \ 119 ../appcompat/src/android/support/v7/app/ActionBarDrawerToggle.java \ 120 121 122support_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) 123support_module_java_packages := android.support.v7.app android.support.v7.media 124include $(SUPPORT_API_CHECK) 125