Android.mk revision 9ec922c215ed95a4bbd8bd7940e81dcfe6926893
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 15LOCAL_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. 21include $(CLEAR_VARS) 22LOCAL_MODULE := android-support-design-res 23LOCAL_SDK_VERSION := current 24LOCAL_SRC_FILES := $(call all-java-files-under, dummy) 25LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res \ 26 frameworks/support/v7/appcompat/res \ 27 frameworks/support/v7/recyclerview/res 28LOCAL_AAPT_FLAGS := \ 29 --auto-add-overlay \ 30 --extra-packages android.support.v7.appcompat \ 31 --extra-packages android.support.v7.recyclerview 32LOCAL_JAR_EXCLUDE_FILES := none 33include $(BUILD_STATIC_JAVA_LIBRARY) 34 35# A helper sub-library to resolve cyclic dependencies between src and the platform dependent 36# implementations 37include $(CLEAR_VARS) 38LOCAL_MODULE := android-support-design-base 39LOCAL_SDK_VERSION := 7 40LOCAL_SRC_FILES := $(call all-java-files-under, base) 41LOCAL_JAVA_LIBRARIES := android-support-design-res \ 42 android-support-v4 \ 43 android-support-v7-appcompat \ 44 android-support-v7-recyclerview 45include $(BUILD_STATIC_JAVA_LIBRARY) 46 47# A helper sub-library that makes direct use of Eclair MR1 APIs 48include $(CLEAR_VARS) 49LOCAL_MODULE := android-support-design-eclair-mr1 50LOCAL_SDK_VERSION := 7 51LOCAL_SRC_FILES := $(call all-java-files-under, eclair-mr1) 52LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-base 53LOCAL_JAVA_LIBRARIES := android-support-design-res \ 54 android-support-v4 \ 55 android-support-v7-appcompat \ 56 android-support-v7-recyclerview 57include $(BUILD_STATIC_JAVA_LIBRARY) 58 59# A helper sub-library that makes direct use of Honeycomb APIs 60include $(CLEAR_VARS) 61LOCAL_MODULE := android-support-design-honeycomb 62LOCAL_SDK_VERSION := 11 63LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb) 64LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-eclair-mr1 65LOCAL_JAVA_LIBRARIES := android-support-design-res \ 66 android-support-v4 \ 67 android-support-v7-appcompat \ 68 android-support-v7-recyclerview 69include $(BUILD_STATIC_JAVA_LIBRARY) 70 71# A helper sub-library that makes direct use of Honeycomb MR1 APIs 72include $(CLEAR_VARS) 73LOCAL_MODULE := android-support-design-honeycomb-mr1 74LOCAL_SDK_VERSION := 12 75LOCAL_SRC_FILES := $(call all-java-files-under, honeycomb-mr1) 76LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb 77LOCAL_JAVA_LIBRARIES := android-support-design-res \ 78 android-support-v4 \ 79 android-support-v7-appcompat \ 80 android-support-v7-recyclerview 81include $(BUILD_STATIC_JAVA_LIBRARY) 82 83# A helper sub-library that makes direct use of ICS APIs 84include $(CLEAR_VARS) 85LOCAL_MODULE := android-support-design-ics 86LOCAL_SDK_VERSION := 14 87LOCAL_SRC_FILES := $(call all-java-files-under, ics) 88LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-honeycomb-mr1 89LOCAL_JAVA_LIBRARIES := android-support-design-res \ 90 android-support-v4 \ 91 android-support-v7-appcompat \ 92 android-support-v7-recyclerview 93include $(BUILD_STATIC_JAVA_LIBRARY) 94 95# A helper sub-library that makes direct use of Lollipop APIs 96include $(CLEAR_VARS) 97LOCAL_MODULE := android-support-design-lollipop 98LOCAL_SDK_VERSION := 21 99LOCAL_SRC_FILES := $(call all-java-files-under, lollipop) 100LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-ics 101LOCAL_JAVA_LIBRARIES := android-support-design-res \ 102 android-support-v4 \ 103 android-support-v7-appcompat \ 104 android-support-v7-recyclerview 105include $(BUILD_STATIC_JAVA_LIBRARY) 106 107# Here is the final static library that apps can link against. 108# The R class is automatically excluded from the generated library. 109# Applications that use this library must specify LOCAL_RESOURCE_DIR 110# in their makefiles to include the resources in their package. 111include $(CLEAR_VARS) 112LOCAL_MODULE := android-support-design 113LOCAL_SDK_VERSION := current 114LOCAL_SRC_FILES := $(call all-java-files-under, src) 115LOCAL_STATIC_JAVA_LIBRARIES := android-support-design-lollipop 116LOCAL_JAVA_LIBRARIES := android-support-design-res \ 117 android-support-v4 \ 118 android-support-v7-appcompat \ 119 android-support-v7-recyclerview 120include $(BUILD_STATIC_JAVA_LIBRARY) 121 122# API Check 123# --------------------------------------------- 124support_module := $(LOCAL_MODULE) 125support_module_api_dir := $(LOCAL_PATH)/api 126support_module_src_files := $(LOCAL_SRC_FILES) 127support_module_java_libraries := $(LOCAL_JAVA_LIBRARIES) 128support_module_java_packages := android.support.design.* 129include $(SUPPORT_API_CHECK) 130