Remove unneeded scripts for d8, r8-compat-proguard and retrace.

The wrappers used to hardcode a memory setting of 2g, but with later
jdk releases the max memory setting has increased and there should not
be a need to hard code the setting.

The retracing of R8 stack traces can be done with the new 'retrace'.

The 'd8-compat-dx' script is removed since the target was removed in
commit 1f6a318a0373fa6a304c3c581c9b3a5583054224.

Bug: b/227746536
Test: n/a
Change-Id: I25e8d6e2565c1c862dc5e731aab2435e708f8a11
diff --git a/Android.bp b/Android.bp
index 8a2f730..d42df23 100644
--- a/Android.bp
+++ b/Android.bp
@@ -53,7 +53,7 @@
 
 java_binary_host {
     name: "d8",
-    wrapper: "d8",
+    main_class: "com.android.tools.r8.D8",
     static_libs: ["r8lib"],
     target: {
         windows: {
@@ -65,7 +65,7 @@
 
 java_binary_host {
     name: "r8-compat-proguard",
-    wrapper: "r8-compat-proguard",
+    main_class: "com.android.tools.r8.compatproguard.CompatProguard",
     static_libs: ["r8lib"],
 }
 
diff --git a/d8 b/d8
deleted file mode 100755
index 3a1fe80..0000000
--- a/d8
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Set up prog to be the path of this script, including following symlinks,
-# and set up progdir to be the fully-qualified pathname of its directory.
-prog="$0"
-while [ -h "${prog}" ]; do
-    newProg=`/bin/ls -ld "${prog}"`
-    newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
-    if expr "x${newProg}" : 'x/' >/dev/null; then
-        prog="${newProg}"
-    else
-        progdir=`dirname "${prog}"`
-        prog="${progdir}/${newProg}"
-    fi
-done
-oldwd=`pwd`
-progdir=`dirname "${prog}"`
-cd "${progdir}"
-progdir=`pwd`
-prog="${progdir}"/`basename "${prog}"`
-cd "${oldwd}"
-
-jarfile=d8.jar
-libdir="$progdir"
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    # set d8.jar location for the SDK case
-    libdir="$libdir/lib"
-fi
-
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    # set d8.jar location for the Android tree case
-    libdir=`dirname "$progdir"`/framework
-fi
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    echo `basename "$prog"`": can't find $jarfile"
-    exit 1
-fi
-
-# By default, give d8 a max heap size of 2 gigs. This can be overridden
-# by using a "-J" option (see below).
-defaultMx="-Xmx2G"
-
-# The following will extract any initial parameters of the form
-# "-J<stuff>" from the command line and pass them to the Java
-# invocation (instead of to d8). This makes it possible for you to add
-# a command-line parameter such as "-JXmx256M" in your scripts, for
-# example. "java" (with no args) and "java -X" give a summary of
-# available options.
-
-declare -a javaOpts=()
-
-while expr "x$1" : 'x-J' >/dev/null; do
-    opt=`expr "x$1" : 'x-J\(.*\)'`
-    javaOpts+=("-${opt}")
-    if expr "x${opt}" : "xXmx[0-9]" >/dev/null; then
-        defaultMx="no"
-    fi
-    shift
-done
-
-if [ "${defaultMx}" != "no" ]; then
-    javaOpts+=("${defaultMx}")
-fi
-
-if [ "$OSTYPE" = "cygwin" ]; then
-    # For Cygwin, convert the jarfile path into native Windows style.
-    jarpath=`cygpath -w "$libdir/$jarfile"`
-else
-    jarpath="$libdir/$jarfile"
-fi
-
-exec java "${javaOpts[@]}" -cp "$jarpath" com.android.tools.r8.D8 "$@"
diff --git a/d8-compat-dx b/d8-compat-dx
deleted file mode 100755
index 0b13333..0000000
--- a/d8-compat-dx
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Set up prog to be the path of this script, including following symlinks,
-# and set up progdir to be the fully-qualified pathname of its directory.
-prog="$0"
-while [ -h "${prog}" ]; do
-    newProg=`/bin/ls -ld "${prog}"`
-    newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
-    if expr "x${newProg}" : 'x/' >/dev/null; then
-        prog="${newProg}"
-    else
-        progdir=`dirname "${prog}"`
-        prog="${progdir}/${newProg}"
-    fi
-done
-oldwd=`pwd`
-progdir=`dirname "${prog}"`
-cd "${progdir}"
-progdir=`pwd`
-prog="${progdir}"/`basename "${prog}"`
-cd "${oldwd}"
-
-jarfile=d8-compat-dx.jar
-libdir="$progdir"
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    # set d8.jar location for the SDK case
-    libdir="$libdir/lib"
-fi
-
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    # set d8.jar location for the Android tree case
-    libdir=`dirname "$progdir"`/framework
-fi
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    echo `basename "$prog"`": can't find $jarfile"
-    exit 1
-fi
-
-# By default, give d8 a max heap size of 2 gigs. This can be overridden
-# by using a "-J" option (see below).
-defaultMx="-Xmx2G"
-
-# The following will extract any initial parameters of the form
-# "-J<stuff>" from the command line and pass them to the Java
-# invocation (instead of to d8). This makes it possible for you to add
-# a command-line parameter such as "-JXmx256M" in your scripts, for
-# example. "java" (with no args) and "java -X" give a summary of
-# available options.
-
-javaOpts=""
-
-while expr "x$1" : 'x-J' >/dev/null; do
-    opt=`expr "x$1" : 'x-J\(.*\)'`
-    javaOpts="${javaOpts} -${opt}"
-    if expr "x${opt}" : "xXmx[0-9]" >/dev/null; then
-        defaultMx="no"
-    fi
-    shift
-done
-
-if [ "${defaultMx}" != "no" ]; then
-    javaOpts="${javaOpts} ${defaultMx}"
-fi
-
-if [ "$OSTYPE" = "cygwin" ]; then
-    # For Cygwin, convert the jarfile path into native Windows style.
-    jarpath=`cygpath -w "$libdir/$jarfile"`
-else
-    jarpath="$libdir/$jarfile"
-fi
-
-exec java "${javaOpts[@]}" -cp "$jarpath" com.android.tools.r8.compatdx.CompatDx "$@"
diff --git a/r8-compat-proguard b/r8-compat-proguard
deleted file mode 100755
index 4cc7cc3..0000000
--- a/r8-compat-proguard
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Set up prog to be the path of this script, including following symlinks,
-# and set up progdir to be the fully-qualified pathname of its directory.
-prog="$0"
-while [ -h "${prog}" ]; do
-    newProg=`/bin/ls -ld "${prog}"`
-    newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
-    if expr "x${newProg}" : 'x/' >/dev/null; then
-        prog="${newProg}"
-    else
-        progdir=`dirname "${prog}"`
-        prog="${progdir}/${newProg}"
-    fi
-done
-oldwd=`pwd`
-progdir=`dirname "${prog}"`
-cd "${progdir}"
-progdir=`pwd`
-prog="${progdir}"/`basename "${prog}"`
-cd "${oldwd}"
-
-jarfile=r8-compat-proguard.jar
-libdir="$progdir"
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    # set r8.jar location for the SDK case
-    libdir="$libdir/lib"
-fi
-
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    # set r8.jar location for the Android tree case
-    libdir=`dirname "$progdir"`/framework
-fi
-
-if [ ! -r "$libdir/$jarfile" ]; then
-    echo `basename "$prog"`": can't find $jarfile"
-    exit 1
-fi
-
-# By default, give r8 a max heap size of 2 gigs. This can be overridden
-# by using a "-J" option (see below).
-defaultMx="-Xmx2G"
-
-# The following will extract any initial parameters of the form
-# "-J<stuff>" from the command line and pass them to the Java
-# invocation (instead of to r8). This makes it possible for you to add
-# a command-line parameter such as "-JXmx256M" in your scripts, for
-# example. "java" (with no args) and "java -X" give a summary of
-# available options.
-
-declare -a javaOpts=()
-
-while expr "x$1" : 'x-J' >/dev/null; do
-    opt=`expr "x$1" : 'x-J\(.*\)'`
-    javaOpts+=("-${opt}")
-    if expr "x${opt}" : "xXmx[0-9]" >/dev/null; then
-        defaultMx="no"
-    fi
-    shift
-done
-
-if [ "${defaultMx}" != "no" ]; then
-    javaOpts+=("${defaultMx}")
-fi
-
-if [ "$OSTYPE" = "cygwin" ]; then
-    # For Cygwin, convert the jarfile path into native Windows style.
-    jarpath=`cygpath -w "$libdir/$jarfile"`
-else
-    jarpath="$libdir/$jarfile"
-fi
-
-exec java "${javaOpts[@]}" -cp "$jarpath" com.android.tools.r8.compatproguard.CompatProguard "$@"
diff --git a/retrace-r8.sh b/retrace-r8.sh
deleted file mode 100755
index b68ecce..0000000
--- a/retrace-r8.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2019 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Call retrace with the r8 map file.
-#
-# Usage:
-#
-#     retrace-r8.sh [-verbose] [<stacktrace_file>]
-#
-# Read from stdin if stacktrace file is not specified.
-
-# Set up prog to be the path of this script, including following symlinks,
-# and set up progdir to be the fully-qualified pathname of its directory.
-prog="$0"
-while [ -h "${prog}" ]; do
-    newProg=`/bin/ls -ld "${prog}"`
-    newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
-    if expr "x${newProg}" : 'x/' >/dev/null; then
-        prog="${newProg}"
-    else
-        progdir=`dirname "${prog}"`
-        prog="${progdir}/${newProg}"
-    fi
-done
-oldwd=`pwd`
-progdir=`dirname "${prog}"`
-cd "${progdir}"
-progdir=`pwd`
-prog="${progdir}"/`basename "${prog}"`
-cd "${oldwd}"
-
-retracedir="${progdir}"
-retracejar="r8.jar"
-
-if [ ! -r "${retracedir}/${retracejar}" ]; then
-    echo `basename "$prog"`": can't find ${retracejar}"
-    exit 1
-fi
-
-mapfile="r8.jar.map"
-
-if [ ! -r "${progdir}/${mapfile}" ]; then
-    echo `basename "${prog}"`": can't find ${mapfile}"
-    exit 1
-fi
-
-if [ "$OSTYPE" = "cygwin" ]; then
-    # For Cygwin, convert the scriptfile path into native Windows style.
-    mappath=`cygpath -w "${progdir}/${mapfile}"`
-    retracepath=`cygpath -w "${retracedir}/${retracejar}"`
-else
-    mappath="${progdir}/${mapfile}"
-    retracepath="${retracedir}/${retracejar}"
-fi
-
-exec java -cp "${retracepath}" com.android.tools.r8.retrace.Retrace "${mappath}" "$@"