Android.mk revision ebd3d9078dbaebd10a9506ca086435eb63e8a2d2
1# 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 17# Build the resources using the current SDK version. 18# 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-v17-leanback-res 23LOCAL_SDK_VERSION := current 24LOCAL_SRC_FILES := $(call all-java-files-under, dummy) 25LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 26LOCAL_AAPT_FLAGS := \ 27 --auto-add-overlay 28LOCAL_JAR_EXCLUDE_FILES := none 29include $(BUILD_STATIC_JAVA_LIBRARY) 30 31# ----------------------------------------------------------------------- 32 33# Base sub-library contains classes both needed by api-level specific libraries 34# (e.g. KitKat) and final static library. 35include $(CLEAR_VARS) 36LOCAL_MODULE := android-support-v17-leanback-common 37LOCAL_SDK_VERSION := 17 38LOCAL_SRC_FILES := $(call all-java-files-under, common) 39include $(BUILD_STATIC_JAVA_LIBRARY) 40 41# ----------------------------------------------------------------------- 42 43# A helper sub-library that makes direct use of API 21. 44include $(CLEAR_VARS) 45LOCAL_MODULE := android-support-v17-leanback-api21 46LOCAL_SDK_VERSION := 21 47LOCAL_SRC_FILES := $(call all-java-files-under, api21) 48LOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common 49include $(BUILD_STATIC_JAVA_LIBRARY) 50 51# ----------------------------------------------------------------------- 52 53# A helper sub-library that makes direct use of KitKat APIs. 54include $(CLEAR_VARS) 55LOCAL_MODULE := android-support-v17-leanback-kitkat 56LOCAL_SDK_VERSION := 19 57LOCAL_SRC_FILES := $(call all-java-files-under, kitkat) 58LOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common 59include $(BUILD_STATIC_JAVA_LIBRARY) 60 61# ----------------------------------------------------------------------- 62 63# A helper sub-library that makes direct use of JBMR2 APIs. 64include $(CLEAR_VARS) 65LOCAL_MODULE := android-support-v17-leanback-jbmr2 66LOCAL_SDK_VERSION := 18 67LOCAL_SRC_FILES := $(call all-java-files-under, jbmr2) 68LOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common 69include $(BUILD_STATIC_JAVA_LIBRARY) 70 71# ----------------------------------------------------------------------- 72 73# Here is the final static library that apps can link against. 74# The R class is automatically excluded from the generated library. 75# Applications that use this library must specify LOCAL_RESOURCE_DIR 76# in their makefiles to include the resources in their package. 77include $(CLEAR_VARS) 78LOCAL_MODULE := android-support-v17-leanback 79LOCAL_SDK_VERSION := 17 80LOCAL_SRC_FILES := $(call all-java-files-under, src) 81LOCAL_STATIC_JAVA_LIBRARIES := android-support-v17-leanback-kitkat android-support-v17-leanback-jbmr2 \ 82 android-support-v17-leanback-api21 android-support-v17-leanback-common 83LOCAL_JAVA_LIBRARIES := \ 84 android-support-v4 \ 85 android-support-v7-recyclerview \ 86 android-support-v17-leanback-res 87include $(BUILD_STATIC_JAVA_LIBRARY) 88 89 90# =========================================================== 91# Common Droiddoc vars 92leanback.docs.src_files := \ 93 $(call all-java-files-under, src) \ 94 $(call all-html-files-under, src) 95leanback.docs.java_libraries := \ 96 framework \ 97 android-support-v4 \ 98 android-support-v7-recyclerview \ 99 android-support-v17-leanback-res \ 100 android-support-v17-leanback 101 102# Documentation 103# =========================================================== 104include $(CLEAR_VARS) 105 106LOCAL_MODULE := android-support-v17-leanback 107LOCAL_MODULE_CLASS := JAVA_LIBRARIES 108LOCAL_MODULE_TAGS := optional 109 110res.COMMON := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),android-support-v17-leanback-res,,COMMON) 111leanback.docs.src_files := $(leanback.docs.src_files) $(call all-java-files-under, ../../../../$(res.COMMON)) 112 113intermediates.COMMON := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),android-support-v17-leanback,,COMMON) 114 115LOCAL_SRC_FILES := $(leanback.docs.src_files) 116LOCAL_ADDITONAL_JAVA_DIR := $(intermediates.COMMON)/src 117 118LOCAL_SDK_VERSION := 19 119LOCAL_IS_HOST_MODULE := false 120LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := build/tools/droiddoc/templates-sdk 121 122LOCAL_JAVA_LIBRARIES := $(leanback.docs.java_libraries) 123 124LOCAL_DROIDDOC_OPTIONS := \ 125 -offlinemode \ 126 -hdf android.whichdoc offline \ 127 -federate Android http://developer.android.com \ 128 -federationapi Android prebuilts/sdk/api/17.txt \ 129 -hide 113 130 131include $(BUILD_DROIDDOC) 132 133# Stub source files 134# =========================================================== 135 136leanback_internal_api_file := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/android-support-v17-leanback_api.txt 137leanback.docs.stubpackages := android.support.v17.leanback:android.support.v17.leanback.app:android.support.v17.leanback.database:android.support.v17.leanback.widget 138 139include $(CLEAR_VARS) 140 141LOCAL_MODULE := android-support-v17-leanback-stubs 142LOCAL_MODULE_CLASS := JAVA_LIBRARIES 143LOCAL_MODULE_TAGS := optional 144 145LOCAL_SRC_FILES := $(leanback.docs.src_files) 146LOCAL_JAVA_LIBRARIES := $(leanback.docs.java_libraries) 147LOCAL_SDK_VERSION := current 148 149LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := build/tools/droiddoc/templates-sdk 150LOCAL_UNINSTALLABLE_MODULE := true 151 152LOCAL_DROIDDOC_OPTIONS := \ 153 -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android-support-v17-leanback-stubs_intermediates/src \ 154 -stubpackages $(leanback.docs.stubpackages) \ 155 -api $(leanback_internal_api_file) \ 156 -hide 113 \ 157 -nodocs 158 159include $(BUILD_DROIDDOC) 160leanback_stubs_stamp := $(full_target) 161$(leanback_internal_api_file) : $(full_target) 162 163# Cleanup temp vars 164# =========================================================== 165leanback.docs.src_files := 166leanback.docs.java_libraries := 167intermediates.COMMON := 168res.COMMON := 169leanback_internal_api_file := 170leanback_stubs_stamp := 171leanback.docs.stubpackages := 172