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 15 LOCAL_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. 21 include $(CLEAR_VARS) 22 LOCAL_MODULE := android-support-v17-leanback-res 23 LOCAL_SDK_VERSION := current 24 LOCAL_SRC_FILES := $(call all-java-files-under, dummy) 25 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 26 LOCAL_AAPT_FLAGS := \ 27 --auto-add-overlay 28 LOCAL_JAR_EXCLUDE_FILES := none 29 include $(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. 35 include $(CLEAR_VARS) 36 LOCAL_MODULE := android-support-v17-leanback-common 37 LOCAL_SDK_VERSION := 17 38 LOCAL_SRC_FILES := $(call all-java-files-under, common) 39 include $(BUILD_STATIC_JAVA_LIBRARY) 40 41 # ----------------------------------------------------------------------- 42 43 # A helper sub-library that makes direct use of API 21. 44 include $(CLEAR_VARS) 45 LOCAL_MODULE := android-support-v17-leanback-api21 46 LOCAL_SDK_VERSION := current 47 LOCAL_SRC_FILES := $(call all-java-files-under, api21) 48 LOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common 49 include $(BUILD_STATIC_JAVA_LIBRARY) 50 51 # ----------------------------------------------------------------------- 52 53 # A helper sub-library that makes direct use of KitKat APIs. 54 include $(CLEAR_VARS) 55 LOCAL_MODULE := android-support-v17-leanback-kitkat 56 LOCAL_SDK_VERSION := 19 57 LOCAL_SRC_FILES := $(call all-java-files-under, kitkat) 58 LOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common 59 include $(BUILD_STATIC_JAVA_LIBRARY) 60 61 # ----------------------------------------------------------------------- 62 63 # A helper sub-library that makes direct use of JBMR2 APIs. 64 include $(CLEAR_VARS) 65 LOCAL_MODULE := android-support-v17-leanback-jbmr2 66 LOCAL_SDK_VERSION := 18 67 LOCAL_SRC_FILES := $(call all-java-files-under, jbmr2) 68 LOCAL_JAVA_LIBRARIES := android-support-v17-leanback-res android-support-v17-leanback-common 69 include $(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. 77 include $(CLEAR_VARS) 78 LOCAL_MODULE := android-support-v17-leanback 79 LOCAL_SDK_VERSION := 17 80 LOCAL_SRC_FILES := $(call all-java-files-under, src) 81 LOCAL_STATIC_JAVA_LIBRARIES := android-support-v17-leanback-kitkat android-support-v17-leanback-jbmr2 \ 82 android-support-v17-leanback-api21 android-support-v17-leanback-common 83 LOCAL_JAVA_LIBRARIES := \ 84 android-support-v4 \ 85 android-support-v7-recyclerview \ 86 android-support-v17-leanback-res 87 include $(BUILD_STATIC_JAVA_LIBRARY) 88 89 90 # =========================================================== 91 # Common Droiddoc vars 92 leanback.docs.src_files := \ 93 $(call all-java-files-under, src) \ 94 $(call all-html-files-under, src) 95 leanback.docs.java_libraries := \ 96 android-support-v4 \ 97 android-support-v7-recyclerview \ 98 android-support-v17-leanback-res \ 99 android-support-v17-leanback 100 101 # Documentation 102 # =========================================================== 103 include $(CLEAR_VARS) 104 105 LOCAL_MODULE := android-support-v17-leanback 106 LOCAL_MODULE_CLASS := JAVA_LIBRARIES 107 LOCAL_MODULE_TAGS := optional 108 109 intermediates.COMMON := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),android-support-v17-leanback,,COMMON) 110 111 LOCAL_SRC_FILES := $(leanback.docs.src_files) 112 LOCAL_ADDITONAL_JAVA_DIR := $(intermediates.COMMON)/src 113 114 LOCAL_SDK_VERSION := 19 115 LOCAL_IS_HOST_MODULE := false 116 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := build/tools/droiddoc/templates-sdk 117 118 LOCAL_JAVA_LIBRARIES := $(leanback.docs.java_libraries) 119 120 LOCAL_DROIDDOC_OPTIONS := \ 121 -offlinemode \ 122 -hdf android.whichdoc offline \ 123 -federate Android http://developer.android.com \ 124 -federationapi Android prebuilts/sdk/api/17.txt \ 125 -hide 113 126 127 include $(BUILD_DROIDDOC) 128 129 # Stub source files 130 # =========================================================== 131 132 leanback_internal_api_file := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/android-support-v17-leanback_api.txt 133 leanback.docs.stubpackages := android.support.v17.leanback:android.support.v17.leanback.app:android.support.v17.leanback.database:android.support.v17.leanback.widget 134 135 include $(CLEAR_VARS) 136 137 LOCAL_MODULE := android-support-v17-leanback-stubs 138 LOCAL_MODULE_CLASS := JAVA_LIBRARIES 139 LOCAL_MODULE_TAGS := optional 140 141 LOCAL_SRC_FILES := $(leanback.docs.src_files) 142 LOCAL_JAVA_LIBRARIES := $(leanback.docs.java_libraries) 143 LOCAL_SDK_VERSION := current 144 145 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := build/tools/droiddoc/templates-sdk 146 LOCAL_UNINSTALLABLE_MODULE := true 147 148 LOCAL_DROIDDOC_OPTIONS := \ 149 -stubs $(TARGET_OUT_COMMON_INTERMEDIATES)/JAVA_LIBRARIES/android-support-v17-leanback-stubs_intermediates/src \ 150 -stubpackages $(leanback.docs.stubpackages) \ 151 -api $(leanback_internal_api_file) \ 152 -hide 113 \ 153 -nodocs 154 155 include $(BUILD_DROIDDOC) 156 leanback_stubs_stamp := $(full_target) 157 $(leanback_internal_api_file) : $(full_target) 158 159 # Cleanup temp vars 160 # =========================================================== 161 leanback.docs.src_files := 162 leanback.docs.java_libraries := 163 intermediates.COMMON := 164 leanback_internal_api_file := 165 leanback_stubs_stamp := 166 leanback.docs.stubpackages := 167