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 # 15 # 16 17 #disble build in PDK, should add prebuilts/fullsdk to make this work 18 ifneq ($(TARGET_BUILD_PDK),true) 19 20 LOCAL_PATH:= $(call my-dir) 21 22 # Build prebuilt android.support.car library 23 # --------------------------------------------- 24 include $(CLEAR_VARS) 25 26 LOCAL_AAPT_FLAGS := --auto-add-overlay 27 LOCAL_MODULE := android.support.car-prebuilt 28 LOCAL_MODULE_CLASS := JAVA_LIBRARIES 29 30 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 31 32 #TODO(b/72620511) support lib should be able to be using public APIs only 33 #LOCAL_SDK_VERSION := current 34 LOCAL_PRIVATE_PLATFORM_APIS := true 35 36 LOCAL_MANIFEST_FILE := AndroidManifest.xml 37 38 LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) 39 LOCAL_JAVA_LIBRARIES += android.car\ 40 androidx.annotation_annotation 41 42 LOCAL_PROGUARD_ENABLED := custom optimization obfuscation 43 LOCAL_PROGUARD_FLAGS := -dontwarn 44 LOCAL_PROGUARD_FLAG_FILES := proguard-release.flags proguard-extra-keeps.flags 45 46 include $(BUILD_STATIC_JAVA_LIBRARY) 47 48 ifeq ($(BOARD_IS_AUTOMOTIVE), true) 49 $(call dist-for-goals, dist_files, $(built_aar):android.support.car.aar) 50 endif 51 52 # Same as above, except without proguard. 53 # --------------------------------------------- 54 include $(CLEAR_VARS) 55 56 LOCAL_AAPT_FLAGS := --auto-add-overlay 57 LOCAL_MODULE := android.support.car-1p-prebuilt 58 LOCAL_MODULE_CLASS := JAVA_LIBRARIES 59 60 LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 61 62 #TODO(b/72620511) support lib should be able to be using public APIs only 63 #LOCAL_SDK_VERSION := current 64 LOCAL_PRIVATE_PLATFORM_APIS := true 65 66 LOCAL_MANIFEST_FILE := AndroidManifest.xml 67 68 LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) 69 LOCAL_JAVA_LIBRARIES += android.car\ 70 androidx.annotation_annotation 71 72 LOCAL_PROGUARD_ENABLED := disabled 73 include $(BUILD_STATIC_JAVA_LIBRARY) 74 75 ifeq ($(BOARD_IS_AUTOMOTIVE), true) 76 $(call dist-for-goals, dist_files, $(built_aar):android.support.car-1p.aar) 77 endif 78 79 # Build support library. 80 # --------------------------------------------- 81 include $(CLEAR_VARS) 82 83 LOCAL_MODULE := android.support.car 84 85 #TODO(b/72620511) support lib should be able to be using public APIs only 86 #LOCAL_SDK_VERSION := current 87 LOCAL_PRIVATE_PLATFORM_APIS := true 88 89 LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) 90 91 LOCAL_STATIC_JAVA_LIBRARIES += androidx.annotation_annotation 92 93 LOCAL_JAVA_LIBRARIES += android.car 94 95 include $(BUILD_STATIC_JAVA_LIBRARY) 96 97 # API Check 98 # --------------------------------------------- 99 car_module := $(LOCAL_MODULE) 100 car_module_src_files := $(LOCAL_SRC_FILES) 101 car_module_proguard_file := $(LOCAL_PATH)/proguard-release.flags 102 car_module_api_dir := $(LOCAL_PATH)/api 103 car_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) $(LOCAL_STATIC_JAVA_LIBRARIES) framework 104 car_module_java_packages := android.support.car* 105 car_module_include_proguard := true 106 include $(CAR_API_CHECK) 107 108 109 # Generate offline docs 110 #--------------------------------------------- 111 include $(CLEAR_VARS) 112 113 LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) 114 115 LOCAL_DROIDDOC_SOURCE_PATH := $(LOCAL_PATH)/src 116 117 LOCAL_JAVA_LIBRARIES := \ 118 android.car \ 119 androidx.annotation_annotation 120 121 LOCAL_MODULE := android.support.car 122 LOCAL_MODULE_TAGS := optional 123 124 LOCAL_MODULE_CLASS := JAVA_LIBRARIES 125 LOCAL_IS_HOST_MODULE := false 126 127 LOCAL_ADDITIONAL_JAVA_DIR := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),android.support.car,,COMMON) 128 129 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR := external/doclava/res/assets/templates-sdk 130 131 include $(BUILD_DROIDDOC) 132 133 134 endif #TARGET_BUILD_PDK 135