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

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

Issue 2508553002: generate_gradle.py: Add support for junit and java_binary targets (Closed)
Patch Set: update docs/android_studio.md to no long say junit doesn't work Created 4 years, 1 month 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
« no previous file with comments | « build/android/gyp/write_build_config.py ('k') | docs/android_studio.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 # Do not add any imports to non-//build directories here. 5 # Do not add any imports to non-//build directories here.
6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in.
7 import("//build_overrides/build.gni") 7 import("//build_overrides/build.gni")
8 import("//build/config/android/config.gni") 8 import("//build/config/android/config.gni")
9 import("//build/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
10 10
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 if (defined(invoker.input_jars_paths)) { 325 if (defined(invoker.input_jars_paths)) {
326 _rebased_input_jars_paths = 326 _rebased_input_jars_paths =
327 rebase_path(invoker.input_jars_paths, root_build_dir) 327 rebase_path(invoker.input_jars_paths, root_build_dir)
328 args += [ "--extra-classpath-jars=$_rebased_input_jars_paths" ] 328 args += [ "--extra-classpath-jars=$_rebased_input_jars_paths" ]
329 } 329 }
330 if (defined(invoker.proguard_configs)) { 330 if (defined(invoker.proguard_configs)) {
331 _rebased_proguard_configs = 331 _rebased_proguard_configs =
332 rebase_path(invoker.proguard_configs, root_build_dir) 332 rebase_path(invoker.proguard_configs, root_build_dir)
333 args += [ "--proguard-configs=$_rebased_proguard_configs" ] 333 args += [ "--proguard-configs=$_rebased_proguard_configs" ]
334 } 334 }
335 if (defined(invoker.gradle_treat_as_prebuilt) &&
336 invoker.gradle_treat_as_prebuilt) {
337 args += [ "--gradle-treat-as-prebuilt" ]
338 }
339 if (defined(invoker.main_class)) {
340 args += [
341 "--main-class",
342 invoker.main_class,
343 ]
344 }
335 if (current_toolchain != default_toolchain) { 345 if (current_toolchain != default_toolchain) {
336 # This has to be a built-time error rather than a GN assert because many 346 # This has to be a built-time error rather than a GN assert because many
337 # packages have a mix of java and non-java targets. For example, the 347 # packages have a mix of java and non-java targets. For example, the
338 # following would fail even though nothing depends on :bar(//baz): 348 # following would fail even though nothing depends on :bar(//baz):
339 # 349 #
340 # shared_library("foo") { 350 # shared_library("foo") {
341 # } 351 # }
342 # 352 #
343 # android_library("bar") { 353 # android_library("bar") {
344 # deps = [ ":foo(//baz)" ] 354 # deps = [ ":foo(//baz)" ]
(...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 # build the _build_config. 2263 # build the _build_config.
2254 if (defined(invoker.override_build_config)) { 2264 if (defined(invoker.override_build_config)) {
2255 _build_config = invoker.override_build_config 2265 _build_config = invoker.override_build_config
2256 } else { 2266 } else {
2257 _build_config = _base_path + ".build_config" 2267 _build_config = _base_path + ".build_config"
2258 build_config_target_name = "${_template_name}__build_config" 2268 build_config_target_name = "${_template_name}__build_config"
2259 2269
2260 write_build_config(build_config_target_name) { 2270 write_build_config(build_config_target_name) {
2261 forward_variables_from(invoker, 2271 forward_variables_from(invoker,
2262 [ 2272 [
2273 "gradle_treat_as_prebuilt",
2263 "input_jars_paths", 2274 "input_jars_paths",
2275 "main_class",
2264 "proguard_configs", 2276 "proguard_configs",
2265 ]) 2277 ])
2266 if (defined(invoker.is_java_binary) && invoker.is_java_binary) { 2278 if (defined(invoker.is_java_binary) && invoker.is_java_binary) {
2267 type = "java_binary" 2279 type = "java_binary"
2268 } else { 2280 } else {
2269 type = "java_library" 2281 type = "java_library"
2270 } 2282 }
2271 if (defined(invoker.deps)) { 2283 if (defined(invoker.deps)) {
2272 possible_config_deps = invoker.deps 2284 possible_config_deps = invoker.deps
2273 } 2285 }
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 rebase_path(root_build_dir, root_build_dir), 2708 rebase_path(root_build_dir, root_build_dir),
2697 "--packed-libraries-dir", 2709 "--packed-libraries-dir",
2698 rebase_path(_packed_libraries_dir, root_build_dir), 2710 rebase_path(_packed_libraries_dir, root_build_dir),
2699 "--libraries=${invoker.libraries_filearg}", 2711 "--libraries=${invoker.libraries_filearg}",
2700 "--filelistjson", 2712 "--filelistjson",
2701 rebase_path(invoker.file_list_json, root_build_dir), 2713 rebase_path(invoker.file_list_json, root_build_dir),
2702 ] 2714 ]
2703 } 2715 }
2704 } 2716 }
2705 } 2717 }
OLDNEW
« no previous file with comments | « build/android/gyp/write_build_config.py ('k') | docs/android_studio.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698