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

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

Issue 1104703003: Actually use --extra-r-text-files in process_resources.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use correct R class in SyncCustomizationFragmentTest Created 5 years, 7 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
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("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 6
7 assert(is_android) 7 assert(is_android)
8 8
9 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) 9 rebased_android_sdk = rebase_path(android_sdk, root_build_dir)
10 rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir) 10 rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir)
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 ] 316 ]
317 } else { 317 } else {
318 assert(!is_apk, "apk build configs require an android_manifest") 318 assert(!is_apk, "apk build configs require an android_manifest")
319 } 319 }
320 if (defined(invoker.custom_package)) { 320 if (defined(invoker.custom_package)) {
321 args += [ 321 args += [
322 "--package-name", 322 "--package-name",
323 invoker.custom_package, 323 invoker.custom_package,
324 ] 324 ]
325 } 325 }
326 if (defined(invoker.r_text)) {
327 args += [
328 "--r-text",
329 rebase_path(invoker.r_text, root_build_dir),
330 ]
331 }
326 } 332 }
327 333
328 if (is_apk) { 334 if (is_apk) {
329 if (defined(invoker.native_libs)) { 335 if (defined(invoker.native_libs)) {
330 inputs += invoker.native_libs 336 inputs += invoker.native_libs
331 rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir) 337 rebased_native_libs = rebase_path(invoker.native_libs, root_build_dir)
332 rebased_android_readelf = rebase_path(android_readelf, root_build_dir) 338 rebased_android_readelf = rebase_path(android_readelf, root_build_dir)
333 args += [ 339 args += [
334 "--native-libs=$rebased_native_libs", 340 "--native-libs=$rebased_native_libs",
335 "--readelf-path=$rebased_android_readelf", 341 "--readelf-path=$rebased_android_readelf",
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 1004
999 # Runs process_resources.py 1005 # Runs process_resources.py
1000 template("process_resources") { 1006 template("process_resources") {
1001 set_sources_assignment_filter([]) 1007 set_sources_assignment_filter([])
1002 if (defined(invoker.testonly)) { 1008 if (defined(invoker.testonly)) {
1003 testonly = invoker.testonly 1009 testonly = invoker.testonly
1004 } 1010 }
1005 1011
1006 zip_path = invoker.zip_path 1012 zip_path = invoker.zip_path
1007 srcjar_path = invoker.srcjar_path 1013 srcjar_path = invoker.srcjar_path
1014 r_text_path = invoker.r_text_path
1008 build_config = invoker.build_config 1015 build_config = invoker.build_config
1009 resource_dirs = invoker.resource_dirs 1016 resource_dirs = invoker.resource_dirs
1010 android_manifest = invoker.android_manifest 1017 android_manifest = invoker.android_manifest
1011 1018
1012 non_constant_id = true 1019 non_constant_id = true
1013 if (defined(invoker.generate_constant_ids) && invoker.generate_constant_ids) { 1020 if (defined(invoker.generate_constant_ids) && invoker.generate_constant_ids) {
1014 non_constant_id = false 1021 non_constant_id = false
1015 } 1022 }
1016 1023
1017 action(target_name) { 1024 action(target_name) {
1018 script = "//build/android/gyp/process_resources.py" 1025 script = "//build/android/gyp/process_resources.py"
1019 1026
1020 depfile = "$target_gen_dir/$target_name.d" 1027 depfile = "$target_gen_dir/$target_name.d"
1021 outputs = [ 1028 outputs = [
1022 depfile, 1029 depfile,
1023 zip_path, 1030 zip_path,
1024 srcjar_path, 1031 srcjar_path,
1032 r_text_path,
1025 ] 1033 ]
1026 1034
1027 sources_build_rel = exec_script("//build/android/gyp/find.py", 1035 sources_build_rel = exec_script("//build/android/gyp/find.py",
1028 rebase_path(resource_dirs, root_build_dir), 1036 rebase_path(resource_dirs, root_build_dir),
1029 "list lines") 1037 "list lines")
1030 sources = rebase_path(sources_build_rel, ".", root_build_dir) 1038 sources = rebase_path(sources_build_rel, ".", root_build_dir)
1031 1039
1032 inputs = [ 1040 inputs = [
1033 build_config, 1041 build_config,
1034 android_manifest, 1042 android_manifest,
1035 ] 1043 ]
1036 1044
1037 rebase_resource_dirs = rebase_path(resource_dirs, root_build_dir) 1045 rebase_resource_dirs = rebase_path(resource_dirs, root_build_dir)
1038 rebase_build_config = rebase_path(build_config, root_build_dir) 1046 rebase_build_config = rebase_path(build_config, root_build_dir)
1039 args = [ 1047 args = [
1040 "--depfile", 1048 "--depfile",
1041 rebase_path(depfile, root_build_dir), 1049 rebase_path(depfile, root_build_dir),
1042 "--android-sdk", 1050 "--android-sdk",
1043 rebase_path(android_sdk, root_build_dir), 1051 rebase_path(android_sdk, root_build_dir),
1044 "--android-sdk-tools", 1052 "--android-sdk-tools",
1045 rebase_path(android_sdk_build_tools, root_build_dir), 1053 rebase_path(android_sdk_build_tools, root_build_dir),
1046 "--android-manifest", 1054 "--android-manifest",
1047 rebase_path(android_manifest, root_build_dir), 1055 rebase_path(android_manifest, root_build_dir),
1048 "--resource-dirs=$rebase_resource_dirs", 1056 "--resource-dirs=$rebase_resource_dirs",
1049 "--srcjar-out", 1057 "--srcjar-out",
1050 rebase_path(srcjar_path, root_build_dir), 1058 rebase_path(srcjar_path, root_build_dir),
1051 "--resource-zip-out", 1059 "--resource-zip-out",
1052 rebase_path(zip_path, root_build_dir), 1060 rebase_path(zip_path, root_build_dir),
1061 "--r-text-out",
1062 rebase_path(r_text_path, root_build_dir),
1053 "--dependencies-res-zips=@FileArg($rebase_build_config:resources:dependenc y_zips)", 1063 "--dependencies-res-zips=@FileArg($rebase_build_config:resources:dependenc y_zips)",
1054 "--extra-res-packages=@FileArg($rebase_build_config:resources:extra_packag e_names)", 1064 "--extra-res-packages=@FileArg($rebase_build_config:resources:extra_packag e_names)",
1065 "--extra-r-text-files=@FileArg($rebase_build_config:resources:extra_r_text _files)",
1055 ] 1066 ]
1056 1067
1057 if (non_constant_id) { 1068 if (non_constant_id) {
1058 args += [ "--non-constant-id" ] 1069 args += [ "--non-constant-id" ]
1059 } 1070 }
1060 1071
1061 if (defined(invoker.custom_package)) { 1072 if (defined(invoker.custom_package)) {
1062 args += [ 1073 args += [
1063 "--custom-package", 1074 "--custom-package",
1064 invoker.custom_package, 1075 invoker.custom_package,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 ] 1165 ]
1155 output = invoker.dex_path 1166 output = invoker.dex_path
1156 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" 1167 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files"
1157 args = [ "--inputs=@FileArg($dex_arg_key)" ] 1168 args = [ "--inputs=@FileArg($dex_arg_key)" ]
1158 if (defined(invoker.excluded_jars)) { 1169 if (defined(invoker.excluded_jars)) {
1159 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir) 1170 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir)
1160 args += [ "--excluded-paths=${excluded_jars}" ] 1171 args += [ "--excluded-paths=${excluded_jars}" ]
1161 } 1172 }
1162 } 1173 }
1163 } 1174 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698