Revert "Support resources shrinking in compiledump"
This reverts commit 90bcad2a95ac018082bd3644e41377853f119114.
Reason for revert: we need to do the horrible reflective access to these methods to support running with older versions of the R8 jar
Change-Id: I9aeb6e6f5d178797b660b144e8929787e09199b5
diff --git a/src/main/java/com/android/tools/r8/utils/CompileDumpCompatR8.java b/src/main/java/com/android/tools/r8/utils/CompileDumpCompatR8.java
index 2421d95..cd01544 100644
--- a/src/main/java/com/android/tools/r8/utils/CompileDumpCompatR8.java
+++ b/src/main/java/com/android/tools/r8/utils/CompileDumpCompatR8.java
@@ -3,8 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.utils;
-import com.android.tools.r8.ArchiveProtoAndroidResourceConsumer;
-import com.android.tools.r8.ArchiveProtoAndroidResourceProvider;
import com.android.tools.r8.CompatProguardCommandBuilder;
import com.android.tools.r8.CompilationFailedException;
import com.android.tools.r8.CompilationMode;
@@ -66,7 +64,7 @@
"--startup-profile");
private static final List<String> VALID_OPTIONS_WITH_TWO_OPERANDS =
- Arrays.asList("--art-profile", "--feature-jar", "--android-resources");
+ Arrays.asList("--art-profile", "--feature-jar");
private static boolean FileUtils_isArchive(Path path) {
String name = path.getFileName().toString().toLowerCase(Locale.ROOT);
@@ -93,8 +91,6 @@
List<Path> mainDexRulesFiles = new ArrayList<>();
Map<Path, Path> artProfileFiles = new LinkedHashMap<>();
List<Path> startupProfileFiles = new ArrayList<>();
- Path androidResourcesInput = null;
- Path androidResourcesOutput = null;
int minApi = 1;
int threads = -1;
boolean enableMissingLibraryApiModeling = false;
@@ -206,12 +202,6 @@
artProfileFiles.put(Paths.get(firstOperand), Paths.get(secondOperand));
break;
}
- case "--android-resources":
- {
- androidResourcesInput = Paths.get(firstOperand);
- androidResourcesOutput = Paths.get(secondOperand);
- break;
- }
case "--feature-jar":
{
Path featureIn = Paths.get(firstOperand);
@@ -247,13 +237,6 @@
if (desugaredLibJson != null) {
commandBuilder.addDesugaredLibraryConfiguration(readAllBytesJava7(desugaredLibJson));
}
- if (androidResourcesInput != null) {
- commandBuilder.setAndroidResourceProvider(
- new ArchiveProtoAndroidResourceProvider(androidResourcesInput));
- assert androidResourcesOutput != null;
- commandBuilder.setAndroidResourceConsumer(
- new ArchiveProtoAndroidResourceConsumer(androidResourcesOutput));
- }
if (desugaredLibKeepRuleConsumer != null) {
commandBuilder.setDesugaredLibraryKeepRuleConsumer(desugaredLibKeepRuleConsumer);
}
diff --git a/tools/compiledump.py b/tools/compiledump.py
index c819865..3c483f7 100755
--- a/tools/compiledump.py
+++ b/tools/compiledump.py
@@ -223,9 +223,6 @@
def main_dex_rules_resource(self):
return self.if_exists('main-dex-rules.txt')
- def resource_ap_file(self):
- return self.if_exists('app-res.ap_')
-
def art_profile_resources(self):
art_profile_resources = []
while True:
@@ -636,10 +633,6 @@
cmd.append('--isolated-splits')
if dump.library_jar():
cmd.extend(['--lib', dump.library_jar()])
- if dump.resource_ap_file():
- res_output = os.path.join(temp, 'ap-res-out.ap_')
- cmd.extend(['--android-resources', dump.resource_ap_file(),
- res_output])
if dump.classpath_jar() and not is_l8_compiler(compiler):
cmd.extend([
'--target' if compiler == 'tracereferences' else '--classpath',