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 # 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 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 _jar_excluded_patterns = invoker.jar_excluded_patterns | 1174 _jar_excluded_patterns = invoker.jar_excluded_patterns |
1175 } | 1175 } |
1176 _strip_resource_classes = defined(invoker.strip_resource_classes) && | 1176 _strip_resource_classes = defined(invoker.strip_resource_classes) && |
1177 invoker.strip_resource_classes | 1177 invoker.strip_resource_classes |
1178 _filter_jar = _jar_excluded_patterns != [] || _strip_resource_classes | 1178 _filter_jar = _jar_excluded_patterns != [] || _strip_resource_classes |
1179 | 1179 |
1180 _enable_assert = | 1180 _enable_assert = |
1181 defined(invoker.supports_android) && invoker.supports_android && | 1181 defined(invoker.supports_android) && invoker.supports_android && |
1182 (is_java_debug || dcheck_always_on) | 1182 (is_java_debug || dcheck_always_on) |
1183 | 1183 |
1184 _retrolambda = | 1184 _desugar = |
1185 defined(invoker.supports_android) && invoker.supports_android && | 1185 defined(invoker.supports_android) && invoker.supports_android && |
1186 ((defined(invoker.process_java8) && invoker.process_java8) || use_java8) | 1186 ((defined(invoker.process_java8) && invoker.process_java8) || use_java8) |
1187 | 1187 |
1188 _deps = [] | 1188 _deps = [] |
1189 _previous_output_jar = _input_jar_path | 1189 _previous_output_jar = _input_jar_path |
1190 | 1190 |
1191 if (_filter_jar) { | 1191 if (_filter_jar) { |
1192 _filter_target = "${target_name}__filter" | 1192 _filter_target = "${target_name}__filter" |
1193 _filter_input_jar = _previous_output_jar | 1193 _filter_input_jar = _previous_output_jar |
1194 _filter_output_jar = "$target_out_dir/$target_name-filtered.jar" | 1194 _filter_output_jar = "$target_out_dir/$target_name-filtered.jar" |
1195 | 1195 |
1196 action(_filter_target) { | 1196 action(_filter_target) { |
1197 script = "//build/android/gyp/jar.py" | 1197 script = "//build/android/gyp/jar.py" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 rebase_path(_assert_input_jar, root_build_dir), | 1253 rebase_path(_assert_input_jar, root_build_dir), |
1254 rebase_path(_assert_output_jar, root_build_dir), | 1254 rebase_path(_assert_output_jar, root_build_dir), |
1255 ] | 1255 ] |
1256 } | 1256 } |
1257 | 1257 |
1258 _deps = [] | 1258 _deps = [] |
1259 _deps = [ ":$_assert_target" ] | 1259 _deps = [ ":$_assert_target" ] |
1260 _previous_output_jar = _assert_output_jar | 1260 _previous_output_jar = _assert_output_jar |
1261 } | 1261 } |
1262 | 1262 |
1263 if (_retrolambda) { | 1263 if (_desugar) { |
1264 _retrolambda_target = "${target_name}__retrolambda" | 1264 _desugar_target = "${target_name}__desugar" |
1265 _retrolambda_input_jar = _previous_output_jar | 1265 _desugar_input_jar = _previous_output_jar |
1266 _retrolambda_output_jar = "$target_out_dir/$target_name-retrolambda.jar" | 1266 _desugar_output_jar = "$target_out_dir/$target_name-desugar.jar" |
1267 | 1267 |
1268 android_sdk_jar = "$android_sdk/android.jar" | 1268 action(_desugar_target) { |
1269 action(_retrolambda_target) { | 1269 script = "//build/android/gyp/desugar.py" |
1270 script = "//build/android/gyp/retrolambda.py" | |
1271 deps = _deps | 1270 deps = _deps |
1272 if (defined(invoker.deps)) { | 1271 if (defined(invoker.deps)) { |
1273 deps += invoker.deps | 1272 deps += invoker.deps |
1274 } | 1273 } |
1275 if (defined(invoker.public_deps)) { | 1274 if (defined(invoker.public_deps)) { |
1276 public_deps = invoker.public_deps | 1275 public_deps = invoker.public_deps |
1277 } | 1276 } |
1278 inputs = [ | 1277 inputs = [ |
1279 _build_config, | 1278 _build_config, |
1280 _retrolambda_input_jar, | 1279 _desugar_input_jar, |
1281 ] | 1280 ] |
1282 outputs = [ | 1281 outputs = [ |
1283 _retrolambda_output_jar, | 1282 _desugar_output_jar, |
1284 ] | 1283 ] |
| 1284 if (defined(invoker.alternative_android_sdk_ijar)) { |
| 1285 deps += [ invoker.alternative_android_sdk_ijar_dep ] |
| 1286 _android_sdk_ijar = invoker.alternative_android_sdk_ijar |
| 1287 } else { |
| 1288 deps += [ "//build/android:android_ijar" ] |
| 1289 _android_sdk_ijar = "$root_out_dir/lib.java/android.interface.jar" |
| 1290 } |
| 1291 inputs += [ _android_sdk_ijar ] |
1285 args = [ | 1292 args = [ |
1286 "--input-jar", | 1293 "--input-jar", |
1287 rebase_path(_retrolambda_input_jar, root_build_dir), | 1294 rebase_path(_desugar_input_jar, root_build_dir), |
1288 "--output-jar", | 1295 "--output-jar", |
1289 rebase_path(_retrolambda_output_jar, root_build_dir), | 1296 rebase_path(_desugar_output_jar, root_build_dir), |
1290 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", | 1297 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", |
1291 "--android-sdk-jar", | 1298 "--bootclasspath-entry", |
1292 rebase_path(android_sdk_jar, root_build_dir), | 1299 rebase_path(_android_sdk_ijar, root_build_dir), |
1293 ] | 1300 ] |
1294 } | 1301 } |
1295 | 1302 |
1296 _deps = [] | 1303 _deps = [] |
1297 _deps = [ ":$_retrolambda_target" ] | 1304 _deps = [ ":$_desugar_target" ] |
1298 _previous_output_jar = _retrolambda_output_jar | 1305 _previous_output_jar = _desugar_output_jar |
1299 } | 1306 } |
1300 | 1307 |
1301 _output_jar_target = "${target_name}__copy" | 1308 _output_jar_target = "${target_name}__copy" |
1302 copy(_output_jar_target) { | 1309 copy(_output_jar_target) { |
1303 deps = _deps | 1310 deps = _deps |
1304 if (defined(invoker.deps)) { | 1311 if (defined(invoker.deps)) { |
1305 deps += invoker.deps | 1312 deps += invoker.deps |
1306 } | 1313 } |
1307 if (defined(invoker.public_deps)) { | 1314 if (defined(invoker.public_deps)) { |
1308 public_deps = invoker.public_deps | 1315 public_deps = invoker.public_deps |
1309 } | 1316 } |
1310 sources = [ | 1317 sources = [ |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2041 # Use original jar_path because _jar_path points to a library without | 2048 # Use original jar_path because _jar_path points to a library without |
2042 # resources. | 2049 # resources. |
2043 java_resources_jar = invoker.jar_path | 2050 java_resources_jar = invoker.jar_path |
2044 } | 2051 } |
2045 } | 2052 } |
2046 | 2053 |
2047 process_java_prebuilt(_process_jar_target_name) { | 2054 process_java_prebuilt(_process_jar_target_name) { |
2048 forward_variables_from(invoker, | 2055 forward_variables_from(invoker, |
2049 [ | 2056 [ |
2050 "jar_excluded_patterns", | 2057 "jar_excluded_patterns", |
| 2058 "process_java8", |
2051 "strip_resource_classes", | 2059 "strip_resource_classes", |
2052 "process_java8", | |
2053 ]) | 2060 ]) |
2054 | 2061 |
2055 visibility = [ | 2062 visibility = [ |
2056 ":$_ijar_target_name", | 2063 ":$_ijar_target_name", |
2057 ":$_template_name", | 2064 ":$_template_name", |
2058 ] | 2065 ] |
2059 if (_supports_android) { | 2066 if (_supports_android) { |
2060 visibility += [ ":$_dex_target_name" ] | 2067 visibility += [ ":$_dex_target_name" ] |
2061 } | 2068 } |
2062 | 2069 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2334 inputs += [ file_tuple[0] ] | 2341 inputs += [ file_tuple[0] ] |
2335 args += | 2342 args += |
2336 [ "--additional-jar-file=" + file_tuple[0] + ":" + file_tuple[1] ] | 2343 [ "--additional-jar-file=" + file_tuple[0] + ":" + file_tuple[1] ] |
2337 } | 2344 } |
2338 if (invoker.java_files != []) { | 2345 if (invoker.java_files != []) { |
2339 args += [ "@" + rebase_path(invoker.java_sources_file, root_build_dir) ] | 2346 args += [ "@" + rebase_path(invoker.java_sources_file, root_build_dir) ] |
2340 } | 2347 } |
2341 } | 2348 } |
2342 | 2349 |
2343 process_java_prebuilt(_process_prebuilt_target_name) { | 2350 process_java_prebuilt(_process_prebuilt_target_name) { |
2344 forward_variables_from(invoker, [ "jar_excluded_patterns" ]) | 2351 forward_variables_from(invoker, |
| 2352 [ |
| 2353 "alternative_android_sdk_ijar", |
| 2354 "alternative_android_sdk_ijar_dep", |
| 2355 "jar_excluded_patterns", |
| 2356 ]) |
2345 supports_android = _supports_android | 2357 supports_android = _supports_android |
2346 build_config = _build_config | 2358 build_config = _build_config |
2347 input_jar_path = _javac_jar_path | 2359 input_jar_path = _javac_jar_path |
2348 output_jar_path = _process_prebuilt_jar_path | 2360 output_jar_path = _process_prebuilt_jar_path |
2349 | 2361 |
2350 deps = [ | 2362 deps = [ |
2351 ":$_javac_target_name", | 2363 ":$_javac_target_name", |
2352 ] | 2364 ] |
2353 if (defined(invoker.deps)) { | 2365 if (defined(invoker.deps)) { |
2354 deps += invoker.deps | 2366 deps += invoker.deps |
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2976 rebase_path(root_build_dir, root_build_dir), | 2988 rebase_path(root_build_dir, root_build_dir), |
2977 "--packed-libraries-dir", | 2989 "--packed-libraries-dir", |
2978 rebase_path(_packed_libraries_dir, root_build_dir), | 2990 rebase_path(_packed_libraries_dir, root_build_dir), |
2979 "--libraries=${invoker.libraries_filearg}", | 2991 "--libraries=${invoker.libraries_filearg}", |
2980 "--filelistjson", | 2992 "--filelistjson", |
2981 rebase_path(invoker.file_list_json, root_build_dir), | 2993 rebase_path(invoker.file_list_json, root_build_dir), |
2982 ] | 2994 ] |
2983 } | 2995 } |
2984 } | 2996 } |
2985 } | 2997 } |
OLD | NEW |