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

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

Issue 2545793002: Android: Add java files from android_apk targets (Closed)
Patch Set: Explicit is better than implicit. Created 4 years 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 | « no previous file | build/config/android/rules.gni » ('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/dcheck_always_on.gni") 9 import("//build/config/dcheck_always_on.gni")
10 import("//build/config/sanitizers/sanitizers.gni") 10 import("//build/config/sanitizers/sanitizers.gni")
(...skipping 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 } 2238 }
2239 2239
2240 template("java_library_impl") { 2240 template("java_library_impl") {
2241 set_sources_assignment_filter([]) 2241 set_sources_assignment_filter([])
2242 forward_variables_from(invoker, [ "testonly" ]) 2242 forward_variables_from(invoker, [ "testonly" ])
2243 _accumulated_deps = [] 2243 _accumulated_deps = []
2244 if (defined(invoker.deps)) { 2244 if (defined(invoker.deps)) {
2245 _accumulated_deps = invoker.deps 2245 _accumulated_deps = invoker.deps
2246 } 2246 }
2247 2247
2248 # Caller overriding build config must have valid java sources file if it has
2249 # java files.
2250 assert(!defined(invoker.override_build_config) ||
2251 !defined(invoker.java_files) || defined(invoker.java_sources_file))
2252
2248 assert(defined(invoker.java_files) || defined(invoker.srcjars) || 2253 assert(defined(invoker.java_files) || defined(invoker.srcjars) ||
2249 defined(invoker.srcjar_deps)) 2254 defined(invoker.srcjar_deps))
2250 _base_path = "$target_gen_dir/$target_name" 2255 _base_path = "$target_gen_dir/$target_name"
2251 2256
2252 if (defined(invoker.output_name)) { 2257 if (defined(invoker.output_name)) {
2253 _output_name = invoker.output_name 2258 _output_name = invoker.output_name
2254 } else { 2259 } else {
2255 _output_name = target_name 2260 _output_name = target_name
2256 } 2261 }
2257 2262
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2319 if (defined(invoker.dex_path)) { 2324 if (defined(invoker.dex_path)) {
2320 _dex_path = invoker.dex_path 2325 _dex_path = invoker.dex_path
2321 } 2326 }
2322 } 2327 }
2323 2328
2324 _java_files = [] 2329 _java_files = []
2325 if (defined(invoker.java_files)) { 2330 if (defined(invoker.java_files)) {
2326 _java_files += invoker.java_files 2331 _java_files += invoker.java_files
2327 } 2332 }
2328 if (_java_files != []) { 2333 if (_java_files != []) {
2329 _java_sources_file = "$_base_path.sources" 2334 if (defined(invoker.java_sources_file)) {
2335 _java_sources_file = invoker.java_sources_file
2336 } else {
2337 _java_sources_file = "$_base_path.sources"
2338 }
2330 write_file(_java_sources_file, rebase_path(_java_files, root_build_dir)) 2339 write_file(_java_sources_file, rebase_path(_java_files, root_build_dir))
2331 } 2340 }
2332 2341
2333 # Define build_config_deps which will be a list of targets required to 2342 # Define build_config_deps which will be a list of targets required to
2334 # build the _build_config. 2343 # build the _build_config.
2335 if (defined(invoker.override_build_config)) { 2344 if (defined(invoker.override_build_config)) {
2336 _build_config = invoker.override_build_config 2345 _build_config = invoker.override_build_config
2337 } else { 2346 } else {
2338 _build_config = _base_path + ".build_config" 2347 _build_config = _base_path + ".build_config"
2339 build_config_target_name = "${_template_name}__build_config" 2348 build_config_target_name = "${_template_name}__build_config"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 rebase_path(root_build_dir, root_build_dir), 2788 rebase_path(root_build_dir, root_build_dir),
2780 "--packed-libraries-dir", 2789 "--packed-libraries-dir",
2781 rebase_path(_packed_libraries_dir, root_build_dir), 2790 rebase_path(_packed_libraries_dir, root_build_dir),
2782 "--libraries=${invoker.libraries_filearg}", 2791 "--libraries=${invoker.libraries_filearg}",
2783 "--filelistjson", 2792 "--filelistjson",
2784 rebase_path(invoker.file_list_json, root_build_dir), 2793 rebase_path(invoker.file_list_json, root_build_dir),
2785 ] 2794 ]
2786 } 2795 }
2787 } 2796 }
2788 } 2797 }
OLDNEW
« no previous file with comments | « no previous file | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698