| 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 assert(defined(invoker.sources)) | 510 assert(defined(invoker.sources)) |
| 511 | 511 |
| 512 _base_path = "$target_gen_dir/$target_name" | 512 _base_path = "$target_gen_dir/$target_name" |
| 513 _resources_zip = _base_path + ".resources.zip" | 513 _resources_zip = _base_path + ".resources.zip" |
| 514 _build_config = _base_path + ".build_config" | 514 _build_config = _base_path + ".build_config" |
| 515 | 515 |
| 516 write_build_config("${target_name}__build_config") { | 516 write_build_config("${target_name}__build_config") { |
| 517 build_config = _build_config | 517 build_config = _build_config |
| 518 resources_zip = _resources_zip | 518 resources_zip = _resources_zip |
| 519 type = "android_resources" | 519 type = "android_resources" |
| 520 is_locale_resource = true |
| 520 } | 521 } |
| 521 | 522 |
| 522 action("${target_name}__create_resources_zip") { | 523 action("${target_name}__create_resources_zip") { |
| 523 forward_variables_from(invoker, | 524 forward_variables_from(invoker, |
| 524 [ | 525 [ |
| 525 "deps", | 526 "deps", |
| 526 "sources", | 527 "sources", |
| 527 ]) | 528 ]) |
| 528 script = "//build/android/gyp/locale_pak_resources.py" | 529 script = "//build/android/gyp/locale_pak_resources.py" |
| 529 depfile = "$target_gen_dir/$target_name.d" | 530 depfile = "$target_gen_dir/$target_name.d" |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 # The extension is automatically changed to ".cr.so". | 1215 # The extension is automatically changed to ".cr.so". |
| 1215 # native_lib_placeholders: List of placeholder filenames to add to the apk | 1216 # native_lib_placeholders: List of placeholder filenames to add to the apk |
| 1216 # (optional). | 1217 # (optional). |
| 1217 # apk_under_test: For an instrumentation test apk, this is the target of the | 1218 # apk_under_test: For an instrumentation test apk, this is the target of the |
| 1218 # tested apk. | 1219 # tested apk. |
| 1219 # include_all_resources - If true include all resource IDs in all generated | 1220 # include_all_resources - If true include all resource IDs in all generated |
| 1220 # R.java files. | 1221 # R.java files. |
| 1221 # testonly: Marks this target as "test-only". | 1222 # testonly: Marks this target as "test-only". |
| 1222 # write_asset_list: Adds an extra file to the assets, which contains a list of | 1223 # write_asset_list: Adds an extra file to the assets, which contains a list of |
| 1223 # all other asset files. | 1224 # all other asset files. |
| 1225 # alternative_locale_resource_dep: The locale resource target which overrides |
| 1226 # any exsting locale resources in dep graph. |
| 1224 # | 1227 # |
| 1225 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in | 1228 # DEPRECATED_java_in_dir: Directory containing java files. All .java files in |
| 1226 # this directory will be included in the library. This is only supported to | 1229 # this directory will be included in the library. This is only supported to |
| 1227 # ease the gyp->gn conversion and will be removed in the future. | 1230 # ease the gyp->gn conversion and will be removed in the future. |
| 1228 # | 1231 # |
| 1229 # Example | 1232 # Example |
| 1230 # android_apk("foo_apk") { | 1233 # android_apk("foo_apk") { |
| 1231 # android_manifest = "AndroidManifest.xml" | 1234 # android_manifest = "AndroidManifest.xml" |
| 1232 # java_files = [ | 1235 # java_files = [ |
| 1233 # "android/org/chromium/foo/FooApplication.java", | 1236 # "android/org/chromium/foo/FooApplication.java", |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1387 apk_path = _final_apk_path | 1390 apk_path = _final_apk_path |
| 1388 resources_zip = resources_zip_path | 1391 resources_zip = resources_zip_path |
| 1389 build_config = _build_config | 1392 build_config = _build_config |
| 1390 android_manifest = _android_manifest | 1393 android_manifest = _android_manifest |
| 1391 | 1394 |
| 1392 deps = _native_libs_deps + _android_manifest_deps | 1395 deps = _native_libs_deps + _android_manifest_deps |
| 1393 if (defined(invoker.deps)) { | 1396 if (defined(invoker.deps)) { |
| 1394 deps += invoker.deps | 1397 deps += invoker.deps |
| 1395 } | 1398 } |
| 1396 | 1399 |
| 1400 if (defined(invoker.alternative_locale_resource_dep)) { |
| 1401 deps += [ invoker.alternative_locale_resource_dep ] |
| 1402 has_alternative_locale_resource = true |
| 1403 } |
| 1404 |
| 1397 proguard_enabled = _proguard_enabled | 1405 proguard_enabled = _proguard_enabled |
| 1398 if (_proguard_enabled) { | 1406 if (_proguard_enabled) { |
| 1399 proguard_info = "$_proguard_jar_path.info" | 1407 proguard_info = "$_proguard_jar_path.info" |
| 1400 } | 1408 } |
| 1401 | 1409 |
| 1402 native_libs = _native_libs | 1410 native_libs = _native_libs |
| 1403 } | 1411 } |
| 1404 | 1412 |
| 1405 _final_deps = [] | 1413 _final_deps = [] |
| 1406 | 1414 |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2235 } | 2243 } |
| 2236 | 2244 |
| 2237 android_library(target_name) { | 2245 android_library(target_name) { |
| 2238 java_files = [] | 2246 java_files = [] |
| 2239 srcjar_deps = [ ":${_template_name}__protoc_java" ] | 2247 srcjar_deps = [ ":${_template_name}__protoc_java" ] |
| 2240 deps = [ | 2248 deps = [ |
| 2241 "//third_party/android_protobuf:protobuf_nano_javalib", | 2249 "//third_party/android_protobuf:protobuf_nano_javalib", |
| 2242 ] | 2250 ] |
| 2243 } | 2251 } |
| 2244 } | 2252 } |
| OLD | NEW |