Remove building of compat jars
Bug: 145339280
Change-Id: Iabc4727526c00df50b80fde25769a83b10122560
diff --git a/build.gradle b/build.gradle
index 8f323aa..2edec91 100644
--- a/build.gradle
+++ b/build.gradle
@@ -821,22 +821,6 @@
}
}
-task CompatDx(type: ShadowJar) {
- from R8.outputs.files
- baseName 'compatdx'
- manifest {
- attributes 'Main-Class': 'com.android.tools.r8.compatdx.CompatDx'
- }
-}
-
-task CompatProguard(type: ShadowJar) {
- from R8.outputs.files
- baseName 'compatproguard'
- manifest {
- attributes 'Main-Class': 'com.android.tools.r8.compatproguard.CompatProguard'
- }
-}
-
def baseR8CommandLine(args = []) {
// Execute r8 commands against a stable r8 with relocated dependencies.
// TODO(b/139725780): See if we can remove or lower the heap size (-Xmx6g).
@@ -934,19 +918,6 @@
outputs.file r8LibExludeDepsPath
}
-task CompatDxLib {
- dependsOn r8LibCreateTask(
- "CompatDx", ["src/main/keep-compatdx.txt"], CompatDx, "build/libs/compatdxlib.jar")
-}
-
-task CompatProguardLib {
- dependsOn r8LibCreateTask(
- "CompatPg",
- ["src/main/keep-compatproguard.txt"],
- CompatProguard,
- "build/libs/compatproguardlib.jar")
-}
-
task sourceJar(type: Jar, dependsOn: classes) {
classifier = 'src'
from sourceSets.main.allSource
diff --git a/scripts/run_d8_on_aosp_echo_code_size.sh b/scripts/run_d8_on_aosp_echo_code_size.sh
deleted file mode 100755
index 51d4200..0000000
--- a/scripts/run_d8_on_aosp_echo_code_size.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Compile AOSP jars with D8 (CompatDX) and print the code size in bytes
-
-set -e
-
-readonly DX_REPLAY="third_party/android_cts_baseline/dx_replay"
-
-"${DX_REPLAY}/replay_script.py" \
- java -jar "build/libs/compatdx.jar" >/dev/null
-
-codesize=$(du -b -d 0 "third_party/android_cts_baseline/dx_replay/out" \
- | grep -Eo "^[0-9]+")
-
-echo "Aosp(CodeSize): $codesize"
-
-
diff --git a/src/main/keep-compatdx.txt b/src/main/keep-compatdx.txt
deleted file mode 100644
index e4c5688..0000000
--- a/src/main/keep-compatdx.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This entry must remain a proper extension of R8 to ensure all required parts are kept.
--include keep.txt
-
--keep public class com.android.tools.r8.compatdx.CompatDx {
- public static void main(java.lang.String[]);
-}
diff --git a/src/main/keep-compatproguard.txt b/src/main/keep-compatproguard.txt
deleted file mode 100644
index 80ca009..0000000
--- a/src/main/keep-compatproguard.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# This entry must remain a proper extension of R8 to ensure all required parts are kept.
--include keep.txt
-
--keep public class com.android.tools.r8.compatproguard.CompatProguard {
- public static void main(java.lang.String[]);
-}
diff --git a/src/test/java/com/android/tools/r8/SanityCheck.java b/src/test/java/com/android/tools/r8/SanityCheck.java
index 527fadd..a7b1990 100644
--- a/src/test/java/com/android/tools/r8/SanityCheck.java
+++ b/src/test/java/com/android/tools/r8/SanityCheck.java
@@ -102,15 +102,11 @@
public void testLibJarsContent() throws Exception {
checkLibJarContent(ToolHelper.R8LIB_JAR, ToolHelper.R8LIB_MAP);
checkLibJarContent(ToolHelper.R8LIB_EXCLUDE_DEPS_JAR, ToolHelper.R8LIB_EXCLUDE_DEPS_MAP);
- checkLibJarContent(ToolHelper.COMPATDXLIB_JAR, ToolHelper.COMPATDXLIB_MAP);
- checkLibJarContent(ToolHelper.COMPATPROGUARDLIB_JAR, ToolHelper.COMPATPROGUARDLIB_MAP);
}
@Test
public void testJarsContent() throws Exception {
checkJarContent(ToolHelper.D8_JAR);
checkJarContent(ToolHelper.R8_JAR);
- checkJarContent(ToolHelper.COMPATDX_JAR);
- checkJarContent(ToolHelper.COMPATPROGUARD_JAR);
}
}
diff --git a/src/test/java/com/android/tools/r8/ToolHelper.java b/src/test/java/com/android/tools/r8/ToolHelper.java
index 772648ce..64c32a0 100644
--- a/src/test/java/com/android/tools/r8/ToolHelper.java
+++ b/src/test/java/com/android/tools/r8/ToolHelper.java
@@ -160,12 +160,6 @@
Paths.get(LIBS_DIR, "r8_with_relocated_deps_11.jar");
public static final Path R8LIB_JAR = Paths.get(LIBS_DIR, "r8lib.jar");
public static final Path R8LIB_MAP = Paths.get(LIBS_DIR, "r8lib.jar.map");
- public static final Path COMPATDX_JAR = Paths.get(LIBS_DIR, "compatdx.jar");
- public static final Path COMPATDXLIB_JAR = Paths.get(LIBS_DIR, "compatdxlib.jar");
- public static final Path COMPATDXLIB_MAP = Paths.get(LIBS_DIR, "compatdxlib.jar.map");
- public static final Path COMPATPROGUARD_JAR = Paths.get(LIBS_DIR, "compatproguard.jar");
- public static final Path COMPATPROGUARDLIB_JAR = Paths.get(LIBS_DIR, "compatproguardlib.jar");
- public static final Path COMPATPROGUARDLIB_MAP = Paths.get(LIBS_DIR, "compatproguardlib.jar.map");
public static final Path R8LIB_EXCLUDE_DEPS_JAR = Paths.get(LIBS_DIR, "r8lib-exclude-deps.jar");
public static final Path R8LIB_EXCLUDE_DEPS_MAP =
Paths.get(LIBS_DIR, "r8lib-exclude-deps.jar.map");
diff --git a/tools/archive.py b/tools/archive.py
index d75242f..ff0f3db 100755
--- a/tools/archive.py
+++ b/tools/archive.py
@@ -138,12 +138,8 @@
gradle.RunGradle([
utils.R8,
utils.D8,
- utils.COMPATDX,
- utils.COMPATPROGUARD,
utils.R8LIB,
utils.R8LIB_NO_DEPS,
- utils.COMPATDXLIB,
- utils.COMPATPROGUARDLIB,
'-Pno_internal'
])
@@ -189,12 +185,6 @@
utils.R8_FULL_EXCLUDE_DEPS_JAR,
utils.R8LIB_EXCLUDE_DEPS_JAR,
utils.R8LIB_EXCLUDE_DEPS_JAR + '.map',
- utils.COMPATDX_JAR,
- utils.COMPATDXLIB_JAR,
- utils.COMPATDXLIB_JAR + '.map',
- utils.COMPATPROGUARD_JAR,
- utils.COMPATPROGUARDLIB_JAR,
- utils.COMPATPROGUARDLIB_JAR + '.map',
utils.MAVEN_ZIP,
utils.MAVEN_ZIP_LIB,
utils.DESUGAR_CONFIGURATION,
diff --git a/tools/create_dx_replay.py b/tools/create_dx_replay.py
index f8fec27..cb27a30 100755
--- a/tools/create_dx_replay.py
+++ b/tools/create_dx_replay.py
@@ -4,7 +4,7 @@
# BSD-style license that can be found in the LICENSE file.
# Take a file where each line is a tab-separated list of arguments for DX (or
-# CompatDX/D8) and create a self-contained directory with all the input files
+# D8) and create a self-contained directory with all the input files
# and a script which replays the same DX invocations as the original list.
#
# Usage:
@@ -12,7 +12,7 @@
# create_dx_replay.py <dx-args-script> <output-dir>
#
# The <dx-args-script> is a text file where each line contains tab-separated
-# arguments for a DX (CompatDX/D8) call.
+# arguments for a DX (D8) call.
# The script 'tools/test_android_cts.py' can log DX invocations during an AOSP
# build to such a file. Use 'test_android_cts.py --tool=d8 --d8log=<file> ...'.
@@ -28,7 +28,7 @@
import utils
IN_SUBDIR = 'in' # subdirectory for the local copy of the input files
-OUT_SUBDIR = 'out' # subdirectory prefix for the output of DX/CompatDX
+OUT_SUBDIR = 'out' # subdirectory prefix for the output of DX
REPLAY_SCRIPT_NAME = 'replay_script.py'
# This function will be called with arguments of the original DX invocation. It
@@ -50,7 +50,7 @@
raise IOError("Adding directories ('{}') to the replay script is not"
" implemented.".format(arg))
elif not exists(arg):
- print("The input file to DX/CompatDX does not exist: '{}'.".format(arg))
+ print("The input file to DX does not exist: '{}'.".format(arg))
input_file = '{}_{}'.format(input_counter, basename(arg))
@@ -63,7 +63,7 @@
def parse_arguments():
parser = argparse.ArgumentParser(
description = 'Creates a self-contained directory for playing back a '
- ' sequence of DX (CompatDX) calls.')
+ ' sequence of DX calls.')
parser.add_argument('dx_call_log',
help = 'File containing tab-separated arguments for a DX call on each'
' line.')
diff --git a/tools/golem_build.py b/tools/golem_build.py
index 30d46bc..cbebc4c 100755
--- a/tools/golem_build.py
+++ b/tools/golem_build.py
@@ -9,7 +9,7 @@
import sys
GRADLE_ARGS = ['--no-daemon']
-BUILD_TARGETS = ['R8', 'D8', 'R8LibApiOnly', 'buildExampleJars', 'CompatDx',
+BUILD_TARGETS = ['R8', 'D8', 'R8LibApiOnly', 'buildExampleJars',
'downloadAndroidCts', 'downloadDx']
def Main():
diff --git a/tools/run_proguard_dx_on_app.py b/tools/run_proguard_dx_on_app.py
index c485ed2..61ac1d7 100755
--- a/tools/run_proguard_dx_on_app.py
+++ b/tools/run_proguard_dx_on_app.py
@@ -3,7 +3,7 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
-# Run ProGuard and the DX or CompatDX (= D8) tool on GmsCore V10.
+# Run ProGuard and the DX (= D8) tool on GmsCore V10.
from __future__ import print_function
from glob import glob
@@ -36,10 +36,6 @@
parser.add_argument('--out',
help = 'Output directory for the DX tool.',
default = os.getcwd())
- parser.add_argument('--compatdx',
- help = 'Use CompatDx (D8) instead of DX.',
- default = False,
- action = 'store_true')
parser.add_argument('--golem',
help = 'Link in third party dependencies.',
default = False,
@@ -130,10 +126,7 @@
proguard_memoryuse = utils.grep_memoryuse(track_memory_file)
# run dex on the result
- if options.compatdx:
- jar = utils.COMPATDX_JAR
- else:
- jar = DX_JAR
+ jar = DX_JAR
with utils.TempDir() as temp:
track_memory_file = None
diff --git a/tools/test_android_cts.py b/tools/test_android_cts.py
index c07a4a0..fa814bc 100755
--- a/tools/test_android_cts.py
+++ b/tools/test_android_cts.py
@@ -147,7 +147,7 @@
if args.tool == 'd8':
use_d8 = 'USE_D8=true'
- gradle.RunGradle(['d8', 'compatdx'])
+ gradle.RunGradle(['d8'])
setup_and_clean(args.tool == 'd8', args.clean_dex)
diff --git a/tools/utils.py b/tools/utils.py
index 2ff2ec2..fe0ca5e 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -41,10 +41,6 @@
R8LIB = 'r8lib'
R8LIB_NO_DEPS = 'r8LibNoDeps'
R8_SRC = 'sourceJar'
-COMPATDX = 'compatdx'
-COMPATDXLIB = 'compatdxlib'
-COMPATPROGUARD = 'compatproguard'
-COMPATPROGUARDLIB = 'compatproguardlib'
D8_JAR = os.path.join(LIBS, 'd8.jar')
R8_JAR = os.path.join(LIBS, 'r8.jar')
@@ -52,10 +48,6 @@
R8_SRC_JAR = os.path.join(LIBS, 'r8-src.jar')
R8LIB_EXCLUDE_DEPS_JAR = os.path.join(LIBS, 'r8lib-exclude-deps.jar')
R8_FULL_EXCLUDE_DEPS_JAR = os.path.join(LIBS, 'r8-full-exclude-deps.jar')
-COMPATDX_JAR = os.path.join(LIBS, 'compatdx.jar')
-COMPATDXLIB_JAR = os.path.join(LIBS, 'compatdxlib.jar')
-COMPATPROGUARD_JAR = os.path.join(LIBS, 'compatproguard.jar')
-COMPATPROGUARDLIB_JAR = os.path.join(LIBS, 'compatproguardlib.jar')
MAVEN_ZIP = os.path.join(LIBS, 'r8.zip')
MAVEN_ZIP_LIB = os.path.join(LIBS, 'r8lib.zip')
# TODO(b/134732760): The JSON configuration should be moved.