Add chrome jar and pg conf to third party
Change the run_on_app script to support running R8 on chrome:
tools/run_on_app.py --app=chrome --compiler=r8 --out /tmp/foo.jar
Cat of third_party/chrome/README.google:
Name: Chrome jar input to proguard/r8
URL: https://chromium.googlesource.com/chromium/src.git
Version: NA
Revision: ffbaa8b35745ca3c87c0a69f3cac9ed9850f7249
Date: September 18 2018
License: 3 clause BSD licence
Build using:
gn gen out/Release --args='target_os="android" use_goma=true is_debug=false experimental_r8_path="/usr/local/google/home/ricow/src/r8/build/libs/r8.jar"'
ninja -C out/Release -j2000 -l20 monochrome_public_apk
Change-Id: I6b170cc852932b1905af9d1dea441dab88ce65b3
diff --git a/tools/run_on_app.py b/tools/run_on_app.py
index cfd9b9f..aa4374f 100755
--- a/tools/run_on_app.py
+++ b/tools/run_on_app.py
@@ -16,9 +16,10 @@
import toolhelper
import utils
import youtube_data
+import chrome_data
TYPES = ['dex', 'deploy', 'proguarded']
-APPS = ['gmscore', 'youtube', 'gmail']
+APPS = ['gmscore', 'youtube', 'gmail', 'chrome']
COMPILERS = ['d8', 'r8']
def ParseOptions(argv):
@@ -119,6 +120,9 @@
elif options.app == 'youtube':
options.version = options.version or '12.22'
data = youtube_data
+ elif options.app == 'chrome':
+ options.version = options.version or 'default'
+ data = chrome_data
elif options.app == 'gmail':
options.version = options.version or '170604.16'
data = gmail_data
@@ -148,9 +152,10 @@
values = version[options.type]
inputs = None
# For R8 'deploy' the JAR is located using the Proguard configuration
- # -injars option.
+ # -injars option. For chrome we don't have the injars in the proguard files.
if 'inputs' in values and (options.compiler != 'r8'
- or options.type != 'deploy'):
+ or options.type != 'deploy'
+ or options.app == 'chrome'):
inputs = values['inputs']
args.extend(['--output', outdir])