1b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# Copyright (C) 2014 The Android Open Source Project
2b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn#
3b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# Licensed under the Apache License, Version 2.0 (the "License");
4b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# you may not use this file except in compliance with the License.
5b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# You may obtain a copy of the License at
6b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn#
7b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn#      http://www.apache.org/licenses/LICENSE-2.0
8b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn#
9b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# Unless required by applicable law or agreed to in writing, software
10b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# distributed under the License is distributed on an "AS IS" BASIS,
11b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# See the License for the specific language governing permissions and
13b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# limitations under the License.
14b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn
15b9537aff4a6ff5231030799cdaf931c27fb9579bTim KilbournLOCAL_PATH:= $(call my-dir)
16b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn
1755c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout# Build the resources using the current SDK version.
1855c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout# We do this here because the final static library must be compiled with an older
1955c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout# SDK version than the resources.  The resources library and the R class that it
2055c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout# contains will not be linked into the final static library.
2155c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stoutinclude $(CLEAR_VARS)
2255c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_MODULE := android-support-v17-leanback-res
2355c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_SDK_VERSION := current
2455c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_SRC_FILES := $(call all-java-files-under, dummy)
2555c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
2655c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_AAPT_FLAGS := \
27a2d41c6cef1c20b2f3dd259c211ea8ec8e2f125aTim Kilbourn        --auto-add-overlay
2855c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_JAR_EXCLUDE_FILES := none
2955c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stoutinclude $(BUILD_STATIC_JAVA_LIBRARY)
3055c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout
3155c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout# -----------------------------------------------------------------------
3255c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout
332f97594742886d045ca1ce409ebc6e6e780452f6Dake Gu#  Base sub-library contains classes both needed by api-level specific libraries
342f97594742886d045ca1ce409ebc6e6e780452f6Dake Gu#  (e.g. KitKat) and final static library.
352f97594742886d045ca1ce409ebc6e6e780452f6Dake Guinclude $(CLEAR_VARS)
362f97594742886d045ca1ce409ebc6e6e780452f6Dake GuLOCAL_MODULE := android-support-v17-leanback-common
372f97594742886d045ca1ce409ebc6e6e780452f6Dake GuLOCAL_SDK_VERSION := 17
382f97594742886d045ca1ce409ebc6e6e780452f6Dake GuLOCAL_SRC_FILES := $(call all-java-files-under, common)
392f97594742886d045ca1ce409ebc6e6e780452f6Dake Guinclude $(BUILD_STATIC_JAVA_LIBRARY)
402f97594742886d045ca1ce409ebc6e6e780452f6Dake Gu
412f97594742886d045ca1ce409ebc6e6e780452f6Dake Gu# -----------------------------------------------------------------------
422f97594742886d045ca1ce409ebc6e6e780452f6Dake Gu
4319312c5f247559a9483d874e62150c49d36aa478Dake Gu#  A helper sub-library that makes direct use of API 21.
4419312c5f247559a9483d874e62150c49d36aa478Dake Guinclude $(CLEAR_VARS)
4519312c5f247559a9483d874e62150c49d36aa478Dake GuLOCAL_MODULE := android-support-v17-leanback-api21
46fcec1282de632ec009109ae3f93a25fea97fc170Griff HazenLOCAL_SDK_VERSION := 21
4719312c5f247559a9483d874e62150c49d36aa478Dake GuLOCAL_SRC_FILES := $(call all-java-files-under, api21)
4819312c5f247559a9483d874e62150c49d36aa478Dake GuLOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common
4919312c5f247559a9483d874e62150c49d36aa478Dake Guinclude $(BUILD_STATIC_JAVA_LIBRARY)
5019312c5f247559a9483d874e62150c49d36aa478Dake Gu
5119312c5f247559a9483d874e62150c49d36aa478Dake Gu# -----------------------------------------------------------------------
5219312c5f247559a9483d874e62150c49d36aa478Dake Gu
5355c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout#  A helper sub-library that makes direct use of KitKat APIs.
5455c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stoutinclude $(CLEAR_VARS)
5555c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_MODULE := android-support-v17-leanback-kitkat
5655c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_SDK_VERSION := 19
5755c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_SRC_FILES := $(call all-java-files-under, kitkat)
582f97594742886d045ca1ce409ebc6e6e780452f6Dake GuLOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common
5955c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stoutinclude $(BUILD_STATIC_JAVA_LIBRARY)
6055c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout
6155c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout# -----------------------------------------------------------------------
62b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn
63892181367d658f347d00ea5e091aa31f086b2a20Dake Gu#  A helper sub-library that makes direct use of JBMR2 APIs.
64892181367d658f347d00ea5e091aa31f086b2a20Dake Guinclude $(CLEAR_VARS)
65892181367d658f347d00ea5e091aa31f086b2a20Dake GuLOCAL_MODULE := android-support-v17-leanback-jbmr2
662f97594742886d045ca1ce409ebc6e6e780452f6Dake GuLOCAL_SDK_VERSION := 18
67892181367d658f347d00ea5e091aa31f086b2a20Dake GuLOCAL_SRC_FILES := $(call all-java-files-under, jbmr2)
682f97594742886d045ca1ce409ebc6e6e780452f6Dake GuLOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common
69892181367d658f347d00ea5e091aa31f086b2a20Dake Guinclude $(BUILD_STATIC_JAVA_LIBRARY)
70892181367d658f347d00ea5e091aa31f086b2a20Dake Gu
71892181367d658f347d00ea5e091aa31f086b2a20Dake Gu# -----------------------------------------------------------------------
72892181367d658f347d00ea5e091aa31f086b2a20Dake Gu
73b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# Here is the final static library that apps can link against.
74b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# The R class is automatically excluded from the generated library.
75b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# Applications that use this library must specify LOCAL_RESOURCE_DIR
76b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# in their makefiles to include the resources in their package.
77b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourninclude $(CLEAR_VARS)
78b9537aff4a6ff5231030799cdaf931c27fb9579bTim KilbournLOCAL_MODULE := android-support-v17-leanback
79b9537aff4a6ff5231030799cdaf931c27fb9579bTim KilbournLOCAL_SDK_VERSION := 17
808b068ddbbf22a246eab49ec25a2f7c3abfbdca51Tim KilbournLOCAL_SRC_FILES := $(call all-java-files-under, src)
812f97594742886d045ca1ce409ebc6e6e780452f6Dake GuLOCAL_STATIC_JAVA_LIBRARIES := android-support-v17-leanback-kitkat android-support-v17-leanback-jbmr2 \
8219312c5f247559a9483d874e62150c49d36aa478Dake Gu        android-support-v17-leanback-api21 android-support-v17-leanback-common
8355c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig StoutLOCAL_JAVA_LIBRARIES := \
84a2d41c6cef1c20b2f3dd259c211ea8ec8e2f125aTim Kilbourn        android-support-v4 \
85a2d41c6cef1c20b2f3dd259c211ea8ec8e2f125aTim Kilbourn        android-support-v7-recyclerview \
86a2d41c6cef1c20b2f3dd259c211ea8ec8e2f125aTim Kilbourn        android-support-v17-leanback-res
87b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourninclude $(BUILD_STATIC_JAVA_LIBRARY)
88b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn
89b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn
9001b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn# ===========================================================
9101b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn# Common Droiddoc vars
9201b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback.docs.src_files := \
9301b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    $(call all-java-files-under, src) \
9401b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    $(call all-html-files-under, src)
9501b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback.docs.java_libraries := \
96eb66dab544c4c1eabe4d469b7cea348d4b01e664Craig Stout    framework \
9701b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    android-support-v4 \
9801b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    android-support-v7-recyclerview \
9901b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    android-support-v17-leanback-res \
10001b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    android-support-v17-leanback
10101b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
10255c9ee4b612ffc7b4632b1e4b7b7ab4900cd47c7Craig Stout# Documentation
103b9537aff4a6ff5231030799cdaf931c27fb9579bTim Kilbourn# ===========================================================
10401b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourninclude $(CLEAR_VARS)
10501b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
10601b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_MODULE := android-support-v17-leanback
10701b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_MODULE_CLASS := JAVA_LIBRARIES
10801b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_MODULE_TAGS := optional
10901b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
11001b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournintermediates.COMMON := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),android-support-v17-leanback,,COMMON)
11101b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
11201b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_SRC_FILES := $(leanback.docs.src_files)
11301b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_ADDITONAL_JAVA_DIR := $(intermediates.COMMON)/src
11401b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
11501b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_SDK_VERSION := 19
11601b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_IS_HOST_MODULE := false
11701b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := build/tools/droiddoc/templates-sdk
11801b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
11901b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_JAVA_LIBRARIES := $(leanback.docs.java_libraries)
12001b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
12101b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_DROIDDOC_OPTIONS := \
12201b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -offlinemode \
12301b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -hdf android.whichdoc offline \
12401b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -federate Android http://developer.android.com \
12501b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -federationapi Android prebuilts/sdk/api/17.txt \
12601b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -hide 113
12701b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
12801b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourninclude $(BUILD_DROIDDOC)
12901b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
13001b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn# Stub source files
13101b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn# ===========================================================
13201b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
13301b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback_internal_api_file := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/android-support-v17-leanback_api.txt
13401b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback.docs.stubpackages := android.support.v17.leanback:android.support.v17.leanback.app:android.support.v17.leanback.database:android.support.v17.leanback.widget
13501b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
13601b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourninclude $(CLEAR_VARS)
13701b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
13801b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_MODULE := android-support-v17-leanback-stubs
13901b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_MODULE_CLASS := JAVA_LIBRARIES
14001b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_MODULE_TAGS := optional
14101b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
14201b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_SRC_FILES := $(leanback.docs.src_files)
14301b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_JAVA_LIBRARIES := $(leanback.docs.java_libraries)
1440a69aaf0f3549157a106e422a4ca09c1d1b8c1afGuang ZhuLOCAL_SDK_VERSION := current
14501b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
14601b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := build/tools/droiddoc/templates-sdk
14701b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_UNINSTALLABLE_MODULE := true
14801b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
14901b7f19dfa3b2ec113f20defacf32d0a548f5bebTim KilbournLOCAL_DROIDDOC_OPTIONS := \
15001b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android-support-v17-leanback-stubs_intermediates/src \
15101b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -stubpackages $(leanback.docs.stubpackages) \
15201b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -api $(leanback_internal_api_file) \
15301b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -hide 113 \
15401b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn    -nodocs
15501b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
15601b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourninclude $(BUILD_DROIDDOC)
15701b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback_stubs_stamp := $(full_target)
15801b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn$(leanback_internal_api_file) : $(full_target)
15901b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn
16001b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn# Cleanup temp vars
16101b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbourn# ===========================================================
16201b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback.docs.src_files :=
16301b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback.docs.java_libraries :=
16401b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournintermediates.COMMON :=
16501b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback_internal_api_file :=
16601b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback_stubs_stamp :=
16701b7f19dfa3b2ec113f20defacf32d0a548f5bebTim Kilbournleanback.docs.stubpackages :=
168