Commit 258ce153 authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Revert "Android: Remove enable_turbine flag"

This reverts commit 43233e9d.

Reason for revert: [Sheriff] Compile failure https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8879044512710669184/+/steps/compile/0/stdout

Original change's description:
> Android: Remove enable_turbine flag
> 
> Now that r8 has been updated to remove unnecessary bridge methods and
> turbine is turned back on for all targets, and robolectric has been
> moved into android_deps, we no longer need this enable_turbine flag. Now
> we can assume that all non-prebuilt java targets have a turbine header.
> 
> Bug: 1056299
> Change-Id: Id3a1d77e572fcd5d231c61deb28b444603dc1a47
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2219670
> Commit-Queue: Peter Wen <wnwen@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Auto-Submit: Peter Wen <wnwen@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#772695}

TBR=wnwen@chromium.org,agrieve@chromium.org

Change-Id: I3a59f2ebe466bea657d7c18f039ed83f72ad1071
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1056299
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2219515Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772717}
parent b6c816a6
......@@ -3143,6 +3143,9 @@ if (enable_java_templates) {
# ones.
# deps: Dependencies for this target.
# testonly: True iff target should only be used for tests.
# enable_turbine: If exists then will be used to determine whether to run
# turbine or not. Useful for disabling turbine headers for problematic
# targets.
# chromium_code: Optional. Whether this is Chromium-specific code. If not
# provided, this is determined automatically, based on the location of
# the source files (i.e. anything under third_party/ is not
......@@ -3310,6 +3313,11 @@ if (enable_java_templates) {
_final_jar_path = invoker.final_jar_path
}
_enable_turbine = _has_sources
if (defined(invoker.enable_turbine)) {
_enable_turbine = invoker.enable_turbine
}
# For static libraries, the javac jar output is created at the intermediate
# path so that it can be processed by another target and moved to the final
# spot that the .build_config knows about. Technically this should be done
......@@ -3318,7 +3326,7 @@ if (enable_java_templates) {
_build_config_jar_path = _final_jar_path
_final_ijar_path = get_path_info(_final_jar_path, "dir") + "/" +
get_path_info(_final_jar_path, "name")
if (_has_sources) {
if (_enable_turbine) {
_final_ijar_path += ".turbine.jar"
} else {
_final_ijar_path += ".ijar.jar"
......@@ -3584,20 +3592,26 @@ if (enable_java_templates) {
_annotation_processor_deps = invoker.annotation_processor_deps
}
compile_java_helper(_header_target_name) {
forward_variables_from(invoker, _compile_java_forward_variables)
use_turbine = true
output_jar_path = _final_ijar_path
generated_jar_path = _generated_jar_path
deps = _annotation_processor_deps
if (_enable_turbine) {
compile_java_helper(_header_target_name) {
forward_variables_from(invoker, _compile_java_forward_variables)
use_turbine = true
output_jar_path = _final_ijar_path
generated_jar_path = _generated_jar_path
deps = _annotation_processor_deps
}
}
_compile_java_target = "${_main_target_name}__compile_java"
compile_java_helper(_compile_java_target) {
forward_variables_from(invoker, _compile_java_forward_variables)
output_jar_path = _javac_jar_path
deps = [ ":$_header_target_name" ]
generated_jar_path = _generated_jar_path
if (_enable_turbine) {
deps = [ ":$_header_target_name" ]
generated_jar_path = _generated_jar_path
} else {
deps = _annotation_processor_deps
}
}
if (_enable_errorprone) {
_compile_java_errorprone_target = "${_main_target_name}__errorprone"
......@@ -3610,8 +3624,12 @@ if (enable_java_templates) {
}
javac_args += invoker.errorprone_args
}
deps = [ ":$_header_target_name" ]
generated_jar_path = _generated_jar_path
if (_enable_turbine) {
deps = [ ":$_header_target_name" ]
generated_jar_path = _generated_jar_path
} else {
deps = _annotation_processor_deps
}
output_jar_path = "$target_out_dir/$target_name.errorprone.stamp"
}
_analysis_public_deps += [ ":$_compile_java_errorprone_target" ]
......@@ -3619,7 +3637,7 @@ if (enable_java_templates) {
} # _has_sources
if (_is_prebuilt || _has_sources) {
if (_is_prebuilt) {
if (!_enable_turbine) {
generate_interface_jar(_header_target_name) {
# Always used the unfiltered .jar to create the interface jar so that
# other targets will resolve filtered classes when depending on
......
......@@ -569,6 +569,10 @@ java_library("robolectric_shadowapi_java") {
java_library("shadows_core_java") {
output_name = "shadows-core-3.2"
# Disable java headers since this target fails to compile with:
# error: An exception occurred in org.robolectric.annotation.processing.RobolectricProcessor:
enable_turbine = false
# Skip platform checks since we must depend on accessibility_test_framework_java
# here which requires_android.
bypass_platform_checks = true
......@@ -1096,6 +1100,10 @@ java_library("shadows_multidex_java") {
# here which requires_android.
bypass_platform_checks = true
# Disable java headers since this target fails to compile with:
# error: An exception occurred in org.robolectric.annotation.processing.RobolectricProcessor:
enable_turbine = false
testonly = true
enable_bytecode_checks = false
processor_args_javac = [ "org.robolectric.annotation.processing.shadowPackage=org.robolectric.shadows.multidex" ]
......@@ -1138,6 +1146,10 @@ java_library("shadows_play_services_java") {
# and google_play_services_library here which both requires_android.
bypass_platform_checks = true
# Disable java headers since this target fails to compile with:
# error: An exception occurred in org.robolectric.annotation.processing.RobolectricProcessor:
enable_turbine = false
testonly = true
enable_bytecode_checks = false
processor_args_javac = [ "org.robolectric.annotation.processing.shadowPackage=org.robolectric.shadows.gms" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment