| 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
|
|
|