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

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

Issue 1498593003: GN(android): Distinguish java_binary from java_library in build_config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@build_config_barriers
Patch Set: Created 5 years 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 dff0ae0205dba3e698241bd8d30ca86bd99c85c7..629ce73d85fbf0cb272574afaa36e206aaa1e93a 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -39,7 +39,7 @@ import write_ordered_libraries
# Types that should never be used as a dependency of another build config.
-_ROOT_TYPES = ('android_apk', 'deps_dex', 'resource_rewriter')
+_ROOT_TYPES = ('android_apk', 'deps_dex', 'java_binary', 'resource_rewriter')
# Types that should not allow code deps to pass through.
_RESOURCE_TYPES = ('android_assets', 'android_resources')
@@ -223,6 +223,7 @@ def main(argv):
parser.error('No positional arguments should be given.')
required_options_map = {
+ 'java_binary': ['build_config', 'jar_path'],
'java_library': ['build_config', 'jar_path'],
'android_assets': ['build_config'],
'android_resources': ['build_config', 'resources_zip'],
@@ -290,7 +291,8 @@ def main(argv):
}
deps_info = config['deps_info']
- if (options.type == 'java_library' and not options.bypass_platform_checks):
+ if (options.type in ('java_binary', 'java_library') and
+ not options.bypass_platform_checks):
deps_info['requires_android'] = options.requires_android
deps_info['supports_android'] = options.supports_android
@@ -307,7 +309,7 @@ def main(argv):
raise Exception('Not all deps support the Android platform: ' +
str(deps_not_support_android))
- if options.type in ('java_library', 'android_apk'):
+ if options.type in ('java_binary', 'java_library', 'android_apk'):
javac_classpath = [c['jar_path'] for c in direct_library_deps]
java_full_classpath = [c['jar_path'] for c in all_library_deps]
deps_info['resources_deps'] = [c['path'] for c in all_resources_deps]
@@ -323,7 +325,7 @@ def main(argv):
'full_classpath': java_full_classpath
}
- if options.type == 'java_library':
+ if options.type in ('java_binary', 'java_library'):
# Only resources might have srcjars (normal srcjar targets are listed in
# srcjar_deps). A resource's srcjar contains the R.java file for those
# resources, and (like Android's default build system) we allow a library to
« 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