| OLD | NEW |
| 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 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2204 # | 2204 # |
| 2205 # This generates java files from protocol buffers and creates an Android library | 2205 # This generates java files from protocol buffers and creates an Android library |
| 2206 # containing the classes. | 2206 # containing the classes. |
| 2207 # | 2207 # |
| 2208 # Variables | 2208 # Variables |
| 2209 # sources: Paths to .proto files to compile. | 2209 # sources: Paths to .proto files to compile. |
| 2210 # proto_path: Root directory of .proto files. | 2210 # proto_path: Root directory of .proto files. |
| 2211 # | 2211 # |
| 2212 # Example: | 2212 # Example: |
| 2213 # proto_java_library("foo_proto_java") { | 2213 # proto_java_library("foo_proto_java") { |
| 2214 # proto_path = [ "src/foo" ] | 2214 # proto_path = "src/foo" |
| 2215 # sources = [ "$proto_path/foo.proto" ] | 2215 # sources = [ "$proto_path/foo.proto" ] |
| 2216 # } | 2216 # } |
| 2217 template("proto_java_library") { | 2217 template("proto_java_library") { |
| 2218 set_sources_assignment_filter([]) | 2218 set_sources_assignment_filter([]) |
| 2219 forward_variables_from(invoker, [ "testonly" ]) | 2219 forward_variables_from(invoker, [ "testonly" ]) |
| 2220 _protoc_dep = "//third_party/android_protobuf:android_protoc($host_toolchain)" | 2220 _protoc_dep = "//third_party/android_protobuf:android_protoc($host_toolchain)" |
| 2221 _protoc_out_dir = get_label_info(_protoc_dep, "root_out_dir") | 2221 _protoc_out_dir = get_label_info(_protoc_dep, "root_out_dir") |
| 2222 _protoc_bin = "$_protoc_out_dir/android_protoc" | 2222 _protoc_bin = "$_protoc_out_dir/android_protoc" |
| 2223 _proto_path = invoker.proto_path | 2223 _proto_path = invoker.proto_path |
| 2224 | 2224 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2254 } | 2254 } |
| 2255 | 2255 |
| 2256 android_library(target_name) { | 2256 android_library(target_name) { |
| 2257 java_files = [] | 2257 java_files = [] |
| 2258 srcjar_deps = [ ":${_template_name}__protoc_java" ] | 2258 srcjar_deps = [ ":${_template_name}__protoc_java" ] |
| 2259 deps = [ | 2259 deps = [ |
| 2260 "//third_party/android_protobuf:protobuf_nano_javalib", | 2260 "//third_party/android_protobuf:protobuf_nano_javalib", |
| 2261 ] | 2261 ] |
| 2262 } | 2262 } |
| 2263 } | 2263 } |
| OLD | NEW |