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