1f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# Copyright (C) 2015 The Android Open Source Project
2f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski#
3f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# Licensed under the Apache License, Version 2.0 (the "License");
4f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# you may not use this file except in compliance with the License.
5f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# You may obtain a copy of the License at
6f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski#
7f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski#      http://www.apache.org/licenses/LICENSE-2.0
8f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski#
9f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# Unless required by applicable law or agreed to in writing, software
10f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# distributed under the License is distributed on an "AS IS" BASIS,
11f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# See the License for the specific language governing permissions and
13f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# limitations under the License.
14f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski
15f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_PATH := $(call my-dir)
16f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski
17f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# Build the resources using the current SDK version.
18f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# We do this here because the final static library must be compiled with an older
19f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# SDK version than the resources.  The resources library and the R class that it
20f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# contains will not be linked into the final static library.
21f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskiinclude $(CLEAR_VARS)
22f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_MODULE := android-support-percent-res
23f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_SDK_VERSION := current
24f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_SRC_FILES := $(call all-java-files-under, dummy)
25f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
26f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_JAR_EXCLUDE_FILES := none
27f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskiinclude $(BUILD_STATIC_JAVA_LIBRARY)
28f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski
29f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# Here is the final static library that apps can link against.
30f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# The R class is automatically excluded from the generated library.
31f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# Applications that use this library must specify LOCAL_RESOURCE_DIR
32f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# in their makefiles to include the resources in their package.
33f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskiinclude $(CLEAR_VARS)
34f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_MODULE := android-support-percent
35f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_SDK_VERSION := 7
36f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_SRC_FILES := $(call all-java-files-under, src)
37f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip GruszczynskiLOCAL_JAVA_LIBRARIES := android-support-percent-res \
38f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski    android-support-v4
39f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskiinclude $(BUILD_STATIC_JAVA_LIBRARY)
40f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski
41f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# API Check
42f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynski# ---------------------------------------------
43f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskisupport_module := $(LOCAL_MODULE)
44f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskisupport_module_api_dir := $(LOCAL_PATH)/api
45f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskisupport_module_src_files := $(LOCAL_SRC_FILES)
46f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskisupport_module_java_libraries := $(LOCAL_JAVA_LIBRARIES)
47f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskisupport_module_java_packages := android.support.percent
48f9cabe2ad76a19d555b5b656d8167bdb167c9d03Filip Gruszczynskiinclude $(SUPPORT_API_CHECK)
49