forked from openkylin/platform_build
Merge "Avoid feeding D8 with dex files." am: c0eabe6d34
am: 6bba1f1ca2
Change-Id: Iac7057b19c71e0330a8f03b8f235a33ef1416651
This commit is contained in:
commit
dae5371f64
|
@ -2415,13 +2415,15 @@ endef
|
||||||
define transform-classes-d8.jar-to-dex
|
define transform-classes-d8.jar-to-dex
|
||||||
@echo "target Dex: $(PRIVATE_MODULE)"
|
@echo "target Dex: $(PRIVATE_MODULE)"
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
$(hide) rm -f $(dir $@)classes*.dex
|
$(hide) rm -rf $(dir $@)classes*.dex $(dir $@)*.class $(dir $@)d8_input
|
||||||
|
$(hide) unzip -qq -d $(dir $@)d8_input $< "*.class"
|
||||||
$(hide) $(DX_COMMAND) \
|
$(hide) $(DX_COMMAND) \
|
||||||
--output $(dir $@) \
|
--output $(dir $@) \
|
||||||
--min-api $(PRIVATE_MIN_SDK_VERSION) \
|
--min-api $(PRIVATE_MIN_SDK_VERSION) \
|
||||||
$(subst --no-locals, --release, \
|
$(subst --no-locals, --release, \
|
||||||
$(filter-out --core-library --multi-dex,$(PRIVATE_DX_FLAGS))) \
|
$(filter-out --core-library --multi-dex,$(PRIVATE_DX_FLAGS))) \
|
||||||
$<
|
$$(find $(dir $@)d8_input -name *.class | sort)
|
||||||
|
$(hide) rm -fr $(dir $@)d8_input
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Create a mostly-empty .jar file that we'll add to later.
|
# Create a mostly-empty .jar file that we'll add to later.
|
||||||
|
|
|
@ -150,6 +150,7 @@ endif
|
||||||
|
|
||||||
$(eval $(call copy-one-file,$(full_classes_jarjar_jar),$(full_classes_jar)))
|
$(eval $(call copy-one-file,$(full_classes_jarjar_jar),$(full_classes_jar)))
|
||||||
|
|
||||||
|
ifneq ($(USE_D8_DESUGAR),true)
|
||||||
my_desugaring :=
|
my_desugaring :=
|
||||||
ifeq ($(LOCAL_JAVA_LANGUAGE_VERSION),1.8)
|
ifeq ($(LOCAL_JAVA_LANGUAGE_VERSION),1.8)
|
||||||
my_desugaring := true
|
my_desugaring := true
|
||||||
|
@ -157,6 +158,9 @@ $(full_classes_desugar_jar): PRIVATE_DX_FLAGS := $(LOCAL_DX_FLAGS)
|
||||||
$(full_classes_desugar_jar): $(full_classes_jar) $(full_java_header_libs) $(DESUGAR)
|
$(full_classes_desugar_jar): $(full_classes_jar) $(full_java_header_libs) $(DESUGAR)
|
||||||
$(desugar-classes-jar)
|
$(desugar-classes-jar)
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
my_desugaring :=
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef my_desugaring
|
ifndef my_desugaring
|
||||||
full_classes_desugar_jar := $(full_classes_jar)
|
full_classes_desugar_jar := $(full_classes_jar)
|
||||||
|
|
Loading…
Reference in New Issue