Merge "Pass min sdk version to dx and desugar" am: bbad7c3e1f am: 4a4325d313

am: 14fce4b072

Change-Id: If9ac3b69957689bd451fc97fe968d79f42a751e9
This commit is contained in:
Colin Cross 2017-02-23 18:24:46 +00:00 committed by android-build-merger
commit 8b0034c435
5 changed files with 20 additions and 14 deletions

View File

@ -2552,7 +2552,8 @@ $(hide) rm -f $@ $@.tmp
$(hide) java -jar $(DESUGAR) \
$(addprefix --bootclasspath_entry ,$(call desugar-bootclasspath,$(PRIVATE_BOOTCLASSPATH))) \
$(addprefix --classpath_entry ,$(PRIVATE_ALL_JAVA_LIBRARIES)) \
--min_sdk_version 24 --allow_empty_bootclasspath \
--min_sdk_version $(PRIVATE_SDK_VERSION) \
--allow_empty_bootclasspath \
$(if $(filter --core-library,$(PRIVATE_DX_FLAGS)),--core_library) \
-i $< -o $@.tmp
mv $@.tmp $@
@ -2568,6 +2569,7 @@ $(hide) rm -f $(dir $@)classes*.dex
$(hide) $(DX) \
-JXms16M -JXmx2048M \
--dex --output=$(dir $@) \
--min-sdk-version=$(PRIVATE_SDK_VERSION) \
$(if $(NO_OPTIMIZE_DX), \
--no-optimize) \
$(if $(GENERATE_DEX_DEBUG), \

View File

@ -133,6 +133,15 @@ $(LOCAL_BUILT_MODULE): $(built_dex) $(java_resource_sources)
$(add-dex-to-package)
endif # !LOCAL_IS_STATIC_JAVA_LIBRARY
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SDK_VERSION := $(LOCAL_SDK_VERSION)
else
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SDK_VERSION := $(PLATFORM_SDK_VERSION)
endif
else # LOCAL_JACK_ENABLED
$(LOCAL_INTERMEDIATE_TARGETS): \
PRIVATE_JACK_INTERMEDIATES_DIR := $(intermediates.COMMON)/jack-rsc

View File

@ -706,6 +706,14 @@ $(LOCAL_MODULE)-findbugs : $(findbugs_html)
endif # full_classes_jar is defined
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SDK_VERSION := $(LOCAL_SDK_VERSION)
else
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_SDK_VERSION := $(PLATFORM_SDK_VERSION)
endif
ifdef LOCAL_JACK_ENABLED
$(LOCAL_INTERMEDIATE_TARGETS): \
PRIVATE_JACK_INTERMEDIATES_DIR := $(intermediates.COMMON)/jack-rsc

View File

@ -307,13 +307,6 @@ endif
$(LOCAL_INTERMEDIATE_TARGETS): \
PRIVATE_ANDROID_MANIFEST := $(full_android_manifest)
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
$(LOCAL_INTERMEDIATE_TARGETS): \
PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
else
$(LOCAL_INTERMEDIATE_TARGETS): \
PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
endif
ifeq ($(LOCAL_DATA_BINDING),true)
data_binding_stamp := $(data_binding_intermediates)/data-binding.stamp

View File

@ -141,12 +141,6 @@ $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RESOURCE_PUBLICS_OUTPUT := $(intermediate
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RESOURCE_DIR := $(LOCAL_RESOURCE_DIR)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_AAPT_INCLUDES := $(framework_res_package_export)
ifneq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEFAULT_APP_TARGET_SDK := $(LOCAL_SDK_VERSION)
else
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEFAULT_APP_TARGET_SDK := $(DEFAULT_APP_TARGET_SDK)
endif
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASSET_DIR :=
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_PROGUARD_OPTIONS_FILE := $(proguard_options_file)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_MANIFEST_PACKAGE_NAME :=