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 23include $(CLEAR_VARS) 24 25LOCAL_AAPT_FLAGS := --auto-add-overlay \ 26 --extra-packages android.support.v7.appcompat \ 27 --extra-packages android.support.v7.recyclerview \ 28 --extra-packages android.support.v7.cardview 29 30LOCAL_MODULE := android.support.car-prebuilt 31 32LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 33LOCAL_RESOURCE_DIR += frameworks/support/v7/appcompat/res 34LOCAL_RESOURCE_DIR += frameworks/support/v7/recyclerview/res 35LOCAL_RESOURCE_DIR += frameworks/support/v7/cardview/res 36LOCAL_SDK_VERSION := current 37 38LOCAL_MANIFEST_FILE := AndroidManifest.xml 39 40LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) 41 42LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4 \ 43 android-support-v7-appcompat \ 44 android-support-v7-recyclerview \ 45 android-support-v7-cardview 46 47LOCAL_JAVA_LIBRARIES += android.car 48 49include $(BUILD_STATIC_JAVA_LIBRARY) 50 51ifeq ($(BOARD_IS_AUTOMOTIVE), true) 52$(call dist-for-goals,dist_files,$(built_aar):android.support.car.aar) 53endif 54 55# Build the resources. 56include $(CLEAR_VARS) 57LOCAL_MODULE := android.support.car-res 58LOCAL_SDK_VERSION := current 59LOCAL_SRC_FILES := $(call all-java-files-under, dummy) 60LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res 61LOCAL_RESOURCE_DIR += frameworks/support/v7/appcompat/res 62LOCAL_RESOURCE_DIR += frameworks/support/v7/recyclerview/res 63LOCAL_RESOURCE_DIR += frameworks/support/v7/cardview/res 64 65LOCAL_AAPT_FLAGS := --auto-add-overlay \ 66 --extra-packages android.support.v7.appcompat \ 67 --extra-packages android.support.v7.recyclerview \ 68 --extra-packages android.support.v7.cardview 69 70LOCAL_JAR_EXCLUDE_FILES := none 71LOCAL_MANIFEST_FILE := AndroidManifest.xml 72 73include $(BUILD_STATIC_JAVA_LIBRARY) 74 75# Build support library. 76include $(CLEAR_VARS) 77 78LOCAL_MODULE := android.support.car 79 80LOCAL_SDK_VERSION := current 81 82LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-Iaidl-files-under, src) 83 84LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4 \ 85 android-support-v7-appcompat \ 86 android-support-v7-recyclerview \ 87 android-support-v7-cardview 88 89LOCAL_JAVA_LIBRARIES += android.car \ 90 android.support.car-res 91 92include $(BUILD_STATIC_JAVA_LIBRARY) 93 94# API Check 95# --------------------------------------------- 96car_module := $(LOCAL_MODULE) 97car_module_src_files := $(LOCAL_SRC_FILES) 98car_module_api_dir := $(LOCAL_PATH)/api 99car_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) $(LOCAL_STATIC_JAVA_LIBRARIES) framework 100car_module_java_packages := android.support.car* 101include $(CAR_API_CHECK) 102 103endif #TARGET_BUILD_PDK 104