forked from openkylin/platform_build
Merge "Avoid feeding D8 with dex files."
am: c0eabe6d34
Change-Id: I4c22efe2b6766341fef64be151ef6f4a944a2cb8
This commit is contained in:
commit
6bba1f1ca2
|
@ -2415,13 +2415,15 @@ endef
|
|||
define transform-classes-d8.jar-to-dex
|
||||
@echo "target Dex: $(PRIVATE_MODULE)"
|
||||
@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) \
|
||||
--output $(dir $@) \
|
||||
--min-api $(PRIVATE_MIN_SDK_VERSION) \
|
||||
$(subst --no-locals, --release, \
|
||||
$(filter-out --core-library --multi-dex,$(PRIVATE_DX_FLAGS))) \
|
||||
$<
|
||||
$$(find $(dir $@)d8_input -name *.class | sort)
|
||||
$(hide) rm -fr $(dir $@)d8_input
|
||||
endef
|
||||
|
||||
# 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)))
|
||||
|
||||
ifneq ($(USE_D8_DESUGAR),true)
|
||||
my_desugaring :=
|
||||
ifeq ($(LOCAL_JAVA_LANGUAGE_VERSION),1.8)
|
||||
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)
|
||||
$(desugar-classes-jar)
|
||||
endif
|
||||
else
|
||||
my_desugaring :=
|
||||
endif
|
||||
|
||||
ifndef my_desugaring
|
||||
full_classes_desugar_jar := $(full_classes_jar)
|
||||
|
|
Loading…
Reference in New Issue