26624e2972
In the build of setup wizard library, if building for unbundled apps (i.e. TARGET_BUILD_APPS is set), don't use AAPT 2, instead reverting to the old way of including as a Java library and including the resource directories directly. Test: make -j showcommands dist TARGET_BUILD_APPS=OobConfig Bug: 35862502 Change-Id: I4e0cae29931b2fda5f8353b3352536cf455e41e6
69 lines
1.8 KiB
Makefile
69 lines
1.8 KiB
Makefile
##
|
|
# Build the platform version of setup wizard library.
|
|
#
|
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_USE_AAPT2 := true
|
|
LOCAL_JAVA_LIBRARIES := \
|
|
android-support-annotations
|
|
LOCAL_MANIFEST_FILE := main/AndroidManifest.xml
|
|
LOCAL_MODULE := setup-wizard-lib
|
|
LOCAL_RESOURCE_DIR := \
|
|
$(LOCAL_PATH)/main/res \
|
|
$(LOCAL_PATH)/platform/res
|
|
LOCAL_SDK_VERSION := current
|
|
LOCAL_SRC_FILES := $(call all-java-files-under, main/src platform/src)
|
|
|
|
include $(BUILD_STATIC_JAVA_LIBRARY)
|
|
|
|
|
|
##
|
|
# Build gingerbread-compat library, which uses AppCompat support library to provide backwards
|
|
# compatibility back to SDK v9.
|
|
#
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
ifeq ($(TARGET_BUILD_APPS),)
|
|
# Use AAPT2 only when TARGET_BUILD_APPS is empty because AAPT2 is not compatible with the current
|
|
# setup of prebuilt support libs used in unbundled builds. b/29836407
|
|
LOCAL_USE_AAPT2 := true
|
|
endif
|
|
|
|
LOCAL_MANIFEST_FILE := main/AndroidManifest.xml
|
|
LOCAL_MODULE := setup-wizard-lib-gingerbread-compat
|
|
LOCAL_RESOURCE_DIR := \
|
|
$(LOCAL_PATH)/main/res \
|
|
$(LOCAL_PATH)/eclair-mr1/res \
|
|
$(LOCAL_PATH)/full-support/res
|
|
LOCAL_SDK_VERSION := current
|
|
LOCAL_SRC_FILES := $(call all-java-files-under, main/src eclair-mr1/src full-support/src)
|
|
|
|
ifdef LOCAL_USE_AAPT2
|
|
|
|
LOCAL_SHARED_ANDROID_LIBRARIES := \
|
|
android-support-v4 \
|
|
android-support-v7-appcompat \
|
|
android-support-v7-recyclerview
|
|
|
|
else
|
|
|
|
LOCAL_AAPT_FLAGS := --auto-add-overlay \
|
|
--extra-packages android.support.v7.appcompat \
|
|
--extra-packages android.support.v7.recyclerview
|
|
|
|
LOCAL_RESOURCE_DIR += \
|
|
frameworks/support/v7/appcompat/res \
|
|
frameworks/support/v7/recyclerview/res
|
|
|
|
LOCAL_JAVA_LIBRARIES := \
|
|
android-support-v4 \
|
|
android-support-v7-appcompat \
|
|
android-support-v7-recyclerview
|
|
|
|
endif
|
|
|
|
include $(BUILD_STATIC_JAVA_LIBRARY)
|