Revert "Filter JUnit and android.test classes from applications using proguard"
This reverts commit f22aca1e47
.
Switching to use -systemjars instead of -libraryjars means that it is no longer
necessary to filter out the junit and android.test classes from jars to which
Proguard is being applied.
Bug: 30188076
Bug: 69156675
Test: make checkbuild
Change-Id: I36e14d28e01517927b458d69ade8ccb2c79a3340
This commit is contained in:
15
core/java.mk
15
core/java.mk
@@ -700,19 +700,6 @@ else
|
||||
extra_input_jar :=
|
||||
endif
|
||||
|
||||
# If building against the current SDK version then filter out the junit,
|
||||
# android.test and c.a.i.u.Predicate classes that are to be removed from
|
||||
# the Android API as part of b/30188076 but which are still present in
|
||||
# the Android API. This is to allow changes to be made to the build to
|
||||
# statically include those classes into the application without
|
||||
# simultaneously removing those classes from the API.
|
||||
proguard_injar_filters :=
|
||||
ifdef LOCAL_SDK_VERSION
|
||||
ifeq (,$(filter-out current system_current test_current, $(LOCAL_SDK_VERSION)))
|
||||
proguard_injar_filters := (!junit/framework/**,!junit/runner/**,!junit/textui/**)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
|
||||
ifneq ($(USE_R8),true)
|
||||
$(full_classes_proguard_jar): .KATI_IMPLICIT_OUTPUTS := $(proguard_dictionary)
|
||||
@@ -725,7 +712,6 @@ endif
|
||||
ifneq ($(USE_R8),true)
|
||||
# Changes to these dependencies need to be replicated below when using R8
|
||||
# instead of Proguard + dx.
|
||||
$(full_classes_proguard_jar): PRIVATE_PROGUARD_INJAR_FILTERS := $(proguard_injar_filters)
|
||||
$(full_classes_proguard_jar): PRIVATE_EXTRA_INPUT_JAR := $(extra_input_jar)
|
||||
$(full_classes_proguard_jar): PRIVATE_PROGUARD_FLAGS := $(legacy_proguard_flags) $(common_proguard_flags) $(LOCAL_PROGUARD_FLAGS)
|
||||
$(full_classes_proguard_jar) : $(full_classes_pre_proguard_jar) $(extra_input_jar) $(my_proguard_sdk_raise) $(common_proguard_flag_files) $(proguard_flag_files) $(legacy_proguard_lib_deps) | $(PROGUARD)
|
||||
@@ -750,7 +736,6 @@ ifeq ($(USE_R8),true)
|
||||
# Proguard + dx. They are used for the generated dex when using R8, as
|
||||
# R8 does Proguard + dx
|
||||
my_r8 := true
|
||||
$(built_dex_intermediate): PRIVATE_PROGUARD_INJAR_FILTERS := $(proguard_injar_filters)
|
||||
$(built_dex_intermediate): PRIVATE_EXTRA_INPUT_JAR := $(extra_input_jar)
|
||||
$(built_dex_intermediate): PRIVATE_PROGUARD_FLAGS := $(legacy_proguard_flags) $(common_proguard_flags) $(LOCAL_PROGUARD_FLAGS)
|
||||
$(built_dex_intermediate) : $(full_classes_proguard_jar) $(extra_input_jar) $(my_support_library_sdk_raise) $(common_proguard_flag_files) $(proguard_flag_files) $(legacy_proguard_lib_deps) $(R8_COMPAT_PROGUARD)
|
||||
|
Reference in New Issue
Block a user