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

Unified Diff: build/config/android/internal_rules.gni

Issue 1317853006: GN: Make the wrapper script generated for junit work without extra args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « build/android/gyp/create_java_binary_script.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/internal_rules.gni
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 26d31fce5c38d9401bcee0037d5727b208a17b5d..f656afe83dee6350f7af3fa5886571e4ee77930e 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -120,6 +120,14 @@ template("findbugs") {
}
# Generates a script in the output bin.java directory to run a java binary.
+#
+# Variables
+# main_class: The class containing the progam entry point.
+# jar_path: The path to the jar to run.
+# script_name: Name of the script to generate.
+# build_config: Path to .build_config for the jar (contains classpath).
+# wrapper_script_args: List of extra arguments to pass to the executable.
+#
template("java_binary_script") {
set_sources_assignment_filter([])
forward_variables_from(invoker, [ "testonly" ])
@@ -153,6 +161,9 @@ template("java_binary_script") {
"--main-class",
_main_class,
]
+ if (defined(invoker.wrapper_script_args)) {
+ args += [ "--" ] + invoker.wrapper_script_args
+ }
}
}
@@ -1288,9 +1299,13 @@ template("java_library_impl") {
if (defined(invoker.main_class)) {
_final_datadeps += [ ":${_template_name}__java_binary_script" ]
java_binary_script("${_template_name}__java_binary_script") {
+ forward_variables_from(invoker,
+ [
+ "main_class",
+ "wrapper_script_args",
+ ])
build_config = _build_config
jar_path = _jar_path
- main_class = invoker.main_class
script_name = _template_name
deps = build_config_deps
}
« no previous file with comments | « build/android/gyp/create_java_binary_script.py ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698