1 ## 2 # Build the platform version of setup wizard library. 3 # 4 5 LOCAL_PATH := $(call my-dir) 6 include $(CLEAR_VARS) 7 8 LOCAL_USE_AAPT2 := true 9 LOCAL_JAVA_LIBRARIES := \ 10 android-support-annotations 11 LOCAL_MANIFEST_FILE := main/AndroidManifest.xml 12 LOCAL_MODULE := setup-wizard-lib 13 LOCAL_RESOURCE_DIR := \ 14 $(LOCAL_PATH)/main/res \ 15 $(LOCAL_PATH)/platform/res 16 LOCAL_SDK_VERSION := current 17 LOCAL_SRC_FILES := $(call all-java-files-under, main/src platform/src) 18 19 include $(BUILD_STATIC_JAVA_LIBRARY) 20 21 22 ## 23 # Build gingerbread-compat library, which uses AppCompat support library to provide backwards 24 # compatibility back to SDK v9. 25 # 26 27 include $(CLEAR_VARS) 28 29 ifeq ($(TARGET_BUILD_APPS),) 30 # Use AAPT2 only when TARGET_BUILD_APPS is empty because AAPT2 is not compatible with the current 31 # setup of prebuilt support libs used in unbundled builds. b/29836407 32 LOCAL_USE_AAPT2 := true 33 endif 34 35 LOCAL_MANIFEST_FILE := main/AndroidManifest.xml 36 LOCAL_MODULE := setup-wizard-lib-gingerbread-compat 37 LOCAL_RESOURCE_DIR := \ 38 $(LOCAL_PATH)/main/res \ 39 $(LOCAL_PATH)/gingerbread/res \ 40 $(LOCAL_PATH)/recyclerview/res 41 LOCAL_SDK_VERSION := current 42 LOCAL_SRC_FILES := $(call all-java-files-under, main/src gingerbread/src recyclerview/src) 43 44 ifdef LOCAL_USE_AAPT2 45 46 LOCAL_SHARED_ANDROID_LIBRARIES := \ 47 android-support-annotations \ 48 android-support-compat \ 49 android-support-core-ui \ 50 android-support-v7-appcompat \ 51 android-support-v7-recyclerview 52 53 else 54 55 LOCAL_AAPT_FLAGS := --auto-add-overlay \ 56 --extra-packages android.support.compat \ 57 --extra-packages android.support.v7.appcompat \ 58 --extra-packages android.support.v7.recyclerview 59 60 LOCAL_RESOURCE_DIR += \ 61 frameworks/support/compat/res \ 62 frameworks/support/v7/appcompat/res \ 63 frameworks/support/v7/recyclerview/res 64 65 LOCAL_JAVA_LIBRARIES := \ 66 android-support-annotations \ 67 android-support-compat \ 68 android-support-core-ui \ 69 android-support-v7-appcompat \ 70 android-support-v7-recyclerview 71 72 endif 73 74 include $(BUILD_STATIC_JAVA_LIBRARY) 75