Allow passing in allowTypeErrors for testing
Do so for the nest compilation.
Change-Id: Ifedba98ff2a4a7dbe2ce88978a0edf9e7f1a79a2
diff --git a/tools/nest_data.py b/tools/nest_data.py
index 92435f6..a87761d 100644
--- a/tools/nest_data.py
+++ b/tools/nest_data.py
@@ -24,6 +24,7 @@
'deploy' : {
'inputs': [os.path.join(V20180926_BASE, 'obsidian-development-debug.jar')],
'libraries' : [ANDROID_JAR],
+ 'allow-type-errors' : 1,
'pgconf': [
os.path.join(V20180926_BASE, 'proguard', 'proguard.cfg'),
os.path.join(V20180926_BASE, 'proguard', 'proguard-no-optimizations.cfg'),
diff --git a/tools/run_on_app.py b/tools/run_on_app.py
index e5ab66c..3e7d78c 100755
--- a/tools/run_on_app.py
+++ b/tools/run_on_app.py
@@ -170,6 +170,7 @@
def run_with_options(options, args):
app_provided_pg_conf = False;
+ extra_args = []
if options.golem:
golem.link_third_party()
options.out = os.getcwd()
@@ -241,6 +242,8 @@
if 'maindexrules' in values:
for rules in values['maindexrules']:
args.extend(['--main-dex-rules', rules])
+ if 'allow-type-errors' in values:
+ extra_args.append('-Dcom.android.tools.r8.allowTypeErrors=1')
if not options.no_libraries and 'libraries' in values:
for lib in values['libraries']:
@@ -290,7 +293,8 @@
build=build,
debug=not options.no_debug,
profile=options.profile,
- track_memory_file=options.track_memory_to_file)
+ track_memory_file=options.track_memory_to_file,
+ extra_args=extra_args)
if exit_code != 0:
return exit_code