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

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

Issue 1681223007: Android Add java_group() template to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: maintain ordering 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
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | 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 import("//base/android/linker/config.gni") 5 import("//base/android/linker/config.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/android/internal_rules.gni") 7 import("//build/config/android/internal_rules.gni")
8 import("//build/config/sanitizers/sanitizers.gni") 8 import("//build/config/sanitizers/sanitizers.gni")
9 import("//build/toolchain/toolchain.gni") 9 import("//build/toolchain/toolchain.gni")
10 import("//third_party/android_platform/config.gni") 10 import("//third_party/android_platform/config.gni")
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 739 }
740 740
741 group(target_name) { 741 group(target_name) {
742 forward_variables_from(invoker, [ "visibility" ]) 742 forward_variables_from(invoker, [ "visibility" ])
743 public_deps = [ 743 public_deps = [
744 ":$_build_config_target_name", 744 ":$_build_config_target_name",
745 ] 745 ]
746 } 746 }
747 } 747 }
748 748
749 # Declare a group() that supports forwarding java dependency information.
750 #
751 # Example
752 # java_group("conditional_deps") {
753 # if (enable_foo) {
754 # deps = [":foo_java"]
755 # }
756 # }
757 template("java_group") {
758 write_build_config("${target_name}__build_config") {
759 forward_variables_from(invoker, [ "deps" ])
760 type = "group"
761 build_config = "$target_gen_dir/${invoker.target_name}.build_config"
762 }
763 group(target_name) {
764 deps = []
765 forward_variables_from(invoker, "*")
766 deps += [ ":${target_name}__build_config" ]
767 }
768 }
769
749 # Declare a target that generates localized strings.xml from a .grd file. 770 # Declare a target that generates localized strings.xml from a .grd file.
750 # 771 #
751 # If this target is included in the deps of an android resources/library/apk, 772 # If this target is included in the deps of an android resources/library/apk,
752 # the strings.xml will be included with that target. 773 # the strings.xml will be included with that target.
753 # 774 #
754 # Variables 775 # Variables
755 # deps: Specifies the dependencies of this target. 776 # deps: Specifies the dependencies of this target.
756 # grd_file: Path to the .grd file to generate strings.xml from. 777 # grd_file: Path to the .grd file to generate strings.xml from.
757 # outputs: Expected grit outputs (see grit rule). 778 # outputs: Expected grit outputs (see grit rule).
758 # 779 #
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 } 2341 }
2321 2342
2322 android_library(target_name) { 2343 android_library(target_name) {
2323 java_files = [] 2344 java_files = []
2324 srcjar_deps = [ ":${_template_name}__protoc_java" ] 2345 srcjar_deps = [ ":${_template_name}__protoc_java" ]
2325 deps = [ 2346 deps = [
2326 "//third_party/android_protobuf:protobuf_nano_javalib", 2347 "//third_party/android_protobuf:protobuf_nano_javalib",
2327 ] 2348 ]
2328 } 2349 }
2329 } 2350 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698