Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Unified Diff: build/android/gyp/write_build_config.py

Issue 2227523002: Pass input_jars_paths of libs to final proguard step (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove print() Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/write_build_config.py
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py
index 22b4e275a1ddaae24940a38c685d058059eaa80e..5ad222a72341a9a411b0c187a20689081ee78b41 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -253,6 +253,9 @@ def main(argv):
help='Whether this library requires running on the Android platform.')
parser.add_option('--bypass-platform-checks', action='store_true',
help='Bypass checks for support/require Android platform.')
+ parser.add_option('--extra-classpath-jars',
+ help='GYP-list of .jar files to include on the classpath when compiling, '
+ 'but not to include in the final binary.')
# android library options
parser.add_option('--dex-path', help='Path to target\'s dex output.')
@@ -521,6 +524,11 @@ def main(argv):
javac_classpath = [c['jar_path'] for c in direct_library_deps]
java_full_classpath = [c['jar_path'] for c in all_library_deps]
+ if options.extra_classpath_jars:
+ extra_jars = build_utils.ParseGypList(options.extra_classpath_jars)
+ deps_info['extra_classpath_jars'] = extra_jars
+ javac_classpath += extra_jars
+
# The java code for an instrumentation test apk is assembled differently for
# ProGuard vs. non-ProGuard.
#
@@ -572,6 +580,10 @@ def main(argv):
config['proguard'] = {}
proguard_config = config['proguard']
proguard_config['input_paths'] = [options.jar_path] + java_full_classpath
+ extra_jars = set()
+ for c in all_library_deps:
+ extra_jars.update(c.get('extra_classpath_jars', ()))
+ proguard_config['lib_paths'] = list(extra_jars)
# Dependencies for the final dex file of an apk or a 'deps_dex'.
if options.type in ['android_apk', 'deps_dex']:
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698