| Index: build/config/android/internal_rules.gni
|
| diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
|
| index 4f1e491392d55caafd1f20e1621031661f8daa1c..3727e8d3c8935d6ca155d8080e3840877e855af1 100644
|
| --- a/build/config/android/internal_rules.gni
|
| +++ b/build/config/android/internal_rules.gni
|
| @@ -341,7 +341,8 @@ template("write_build_config") {
|
|
|
| assert(type == "android_apk" || type == "java_library" ||
|
| type == "android_resources" || type == "deps_dex" ||
|
| - type == "android_assets" || type == "resource_rewriter")
|
| + type == "android_assets" || type == "resource_rewriter" ||
|
| + type == "java_binary")
|
|
|
| deps = []
|
| forward_variables_from(invoker,
|
| @@ -379,7 +380,7 @@ template("write_build_config") {
|
| rebase_path(build_config, root_build_dir),
|
| ]
|
|
|
| - is_java_library = type == "java_library"
|
| + is_java = type == "java_library" || type == "java_binary"
|
| is_apk = type == "android_apk"
|
| is_android_assets = type == "android_assets"
|
| is_android_resources = type == "android_resources"
|
| @@ -387,30 +388,30 @@ template("write_build_config") {
|
|
|
| supports_android =
|
| is_apk || is_android_assets || is_android_resources || is_deps_dex ||
|
| - (is_java_library && defined(invoker.supports_android) &&
|
| + (is_java && defined(invoker.supports_android) &&
|
| invoker.supports_android)
|
| requires_android =
|
| is_apk || is_android_assets || is_android_resources || is_deps_dex ||
|
| - (is_java_library && defined(invoker.requires_android) &&
|
| + (is_java && defined(invoker.requires_android) &&
|
| invoker.requires_android)
|
|
|
| assert(!requires_android || supports_android,
|
| "requires_android requires" + " supports_android")
|
|
|
| # Mark these variables as used.
|
| - assert(is_java_library || true)
|
| + assert(is_java || true)
|
| assert(is_apk || true)
|
| assert(is_android_resources || true)
|
| assert(is_deps_dex || true)
|
|
|
| - if (is_java_library || is_apk) {
|
| + if (is_java || is_apk) {
|
| args += [
|
| "--jar-path",
|
| rebase_path(invoker.jar_path, root_build_dir),
|
| ]
|
| }
|
|
|
| - if (is_apk || is_deps_dex || (is_java_library && supports_android)) {
|
| + if (is_apk || is_deps_dex || (is_java && supports_android)) {
|
| args += [
|
| "--dex-path",
|
| rebase_path(invoker.dex_path, root_build_dir),
|
| @@ -1547,7 +1548,11 @@ template("java_library_impl") {
|
|
|
| write_build_config(build_config_target_name) {
|
| forward_variables_from(invoker, [ "deps" ])
|
| - type = "java_library"
|
| + if (defined(invoker.is_java_binary) && invoker.is_java_binary) {
|
| + type = "java_binary"
|
| + } else {
|
| + type = "java_library"
|
| + }
|
| supports_android = _supports_android
|
| requires_android = _requires_android
|
| bypass_platform_checks = defined(invoker.bypass_platform_checks) &&
|
|
|