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

Side by Side Diff: build/config/android/internal_rules.gni

Issue 1708383002: Put generated non-test Java runner scripts into bin/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add used_by_test_only variable. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
7 import("//build/config/zip.gni") 7 import("//build/config/zip.gni")
8 import("//third_party/ijar/ijar.gni") 8 import("//third_party/ijar/ijar.gni")
9 9
10 assert(is_android) 10 assert(is_android)
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 # wrapper_script_args: List of extra arguments to pass to the executable. 187 # wrapper_script_args: List of extra arguments to pass to the executable.
188 # 188 #
189 template("java_binary_script") { 189 template("java_binary_script") {
190 set_sources_assignment_filter([]) 190 set_sources_assignment_filter([])
191 forward_variables_from(invoker, [ "testonly" ]) 191 forward_variables_from(invoker, [ "testonly" ])
192 192
193 _main_class = invoker.main_class 193 _main_class = invoker.main_class
194 _build_config = invoker.build_config 194 _build_config = invoker.build_config
195 _jar_path = invoker.jar_path 195 _jar_path = invoker.jar_path
196 _script_name = invoker.script_name 196 _script_name = invoker.script_name
197 _used_only_by_tests =
198 defined(invoker.used_only_by_tests) && invoker.used_only_by_tests
197 199
198 action(target_name) { 200 action(target_name) {
199 script = "//build/android/gyp/create_java_binary_script.py" 201 script = "//build/android/gyp/create_java_binary_script.py"
200 depfile = "$target_gen_dir/$_script_name.d" 202 depfile = "$target_gen_dir/$_script_name.d"
201 java_script = "$root_build_dir/bin/helper/$_script_name" 203 java_script = "$root_build_dir/bin/$_script_name"
204 if (_used_only_by_tests) {
205 java_script = "$root_build_dir/bin/helper/$_script_name"
206 }
202 inputs = [ 207 inputs = [
203 _build_config, 208 _build_config,
204 ] 209 ]
205 outputs = [ 210 outputs = [
206 depfile, 211 depfile,
207 java_script, 212 java_script,
208 ] 213 ]
209 forward_variables_from(invoker, [ "deps" ]) 214 forward_variables_from(invoker, [ "deps" ])
210 _rebased_build_config = rebase_path(_build_config, root_build_dir) 215 _rebased_build_config = rebase_path(_build_config, root_build_dir)
211 args = [ 216 args = [
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 } 1296 }
1292 } 1297 }
1293 1298
1294 if (defined(invoker.main_class)) { 1299 if (defined(invoker.main_class)) {
1295 _binary_script_target_name = "${_template_name}__java_binary_script" 1300 _binary_script_target_name = "${_template_name}__java_binary_script"
1296 java_binary_script(_binary_script_target_name) { 1301 java_binary_script(_binary_script_target_name) {
1297 forward_variables_from(invoker, 1302 forward_variables_from(invoker,
1298 [ 1303 [
1299 "bootclasspath", 1304 "bootclasspath",
1300 "main_class", 1305 "main_class",
1306 "used_only_by_tests",
1301 "wrapper_script_args", 1307 "wrapper_script_args",
1302 ]) 1308 ])
1303 build_config = _build_config 1309 build_config = _build_config
1304 jar_path = _jar_path 1310 jar_path = _jar_path
1305 script_name = _template_name 1311 script_name = _template_name
1306 if (defined(invoker.wrapper_script_name)) { 1312 if (defined(invoker.wrapper_script_name)) {
1307 script_name = invoker.wrapper_script_name 1313 script_name = invoker.wrapper_script_name
1308 } 1314 }
1309 deps = [ 1315 deps = [
1310 ":$_build_config_target_name", 1316 ":$_build_config_target_name",
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 deps = build_config_deps 1697 deps = build_config_deps
1692 } 1698 }
1693 1699
1694 if (defined(invoker.main_class)) { 1700 if (defined(invoker.main_class)) {
1695 _final_datadeps += [ ":${_template_name}__java_binary_script" ] 1701 _final_datadeps += [ ":${_template_name}__java_binary_script" ]
1696 java_binary_script("${_template_name}__java_binary_script") { 1702 java_binary_script("${_template_name}__java_binary_script") {
1697 forward_variables_from(invoker, 1703 forward_variables_from(invoker,
1698 [ 1704 [
1699 "bootclasspath", 1705 "bootclasspath",
1700 "main_class", 1706 "main_class",
1707 "used_only_by_tests",
1701 "wrapper_script_args", 1708 "wrapper_script_args",
1702 ]) 1709 ])
1703 build_config = _build_config 1710 build_config = _build_config
1704 jar_path = _jar_path 1711 jar_path = _jar_path
1705 script_name = _template_name 1712 script_name = _template_name
1706 if (defined(invoker.wrapper_script_name)) { 1713 if (defined(invoker.wrapper_script_name)) {
1707 script_name = invoker.wrapper_script_name 1714 script_name = invoker.wrapper_script_name
1708 } 1715 }
1709 deps = build_config_deps 1716 deps = build_config_deps
1710 } 1717 }
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 ] 2166 ]
2160 args = [ 2167 args = [
2161 "--depfile", 2168 "--depfile",
2162 rebase_path(depfile, root_build_dir), 2169 rebase_path(depfile, root_build_dir),
2163 "--script-output-path", 2170 "--script-output-path",
2164 rebase_path(generated_script, root_build_dir), 2171 rebase_path(generated_script, root_build_dir),
2165 ] 2172 ]
2166 args += test_runner_args 2173 args += test_runner_args
2167 } 2174 }
2168 } 2175 }
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | build/config/android/rules.gni » ('j') | build/config/android/rules.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698