Commit 43233e9d authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

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: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772695}
parent ef587cf4
...@@ -3143,9 +3143,6 @@ if (enable_java_templates) { ...@@ -3143,9 +3143,6 @@ if (enable_java_templates) {
# ones. # ones.
# deps: Dependencies for this target. # deps: Dependencies for this target.
# testonly: True iff target should only be used for tests. # 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 # chromium_code: Optional. Whether this is Chromium-specific code. If not
# provided, this is determined automatically, based on the location of # provided, this is determined automatically, based on the location of
# the source files (i.e. anything under third_party/ is not # the source files (i.e. anything under third_party/ is not
...@@ -3313,11 +3310,6 @@ if (enable_java_templates) { ...@@ -3313,11 +3310,6 @@ if (enable_java_templates) {
_final_jar_path = invoker.final_jar_path _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 # 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 # 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 # spot that the .build_config knows about. Technically this should be done
...@@ -3326,7 +3318,7 @@ if (enable_java_templates) { ...@@ -3326,7 +3318,7 @@ if (enable_java_templates) {
_build_config_jar_path = _final_jar_path _build_config_jar_path = _final_jar_path
_final_ijar_path = get_path_info(_final_jar_path, "dir") + "/" + _final_ijar_path = get_path_info(_final_jar_path, "dir") + "/" +
get_path_info(_final_jar_path, "name") get_path_info(_final_jar_path, "name")
if (_enable_turbine) { if (_has_sources) {
_final_ijar_path += ".turbine.jar" _final_ijar_path += ".turbine.jar"
} else { } else {
_final_ijar_path += ".ijar.jar" _final_ijar_path += ".ijar.jar"
...@@ -3592,26 +3584,20 @@ if (enable_java_templates) { ...@@ -3592,26 +3584,20 @@ if (enable_java_templates) {
_annotation_processor_deps = invoker.annotation_processor_deps _annotation_processor_deps = invoker.annotation_processor_deps
} }
if (_enable_turbine) { compile_java_helper(_header_target_name) {
compile_java_helper(_header_target_name) { forward_variables_from(invoker, _compile_java_forward_variables)
forward_variables_from(invoker, _compile_java_forward_variables) use_turbine = true
use_turbine = true output_jar_path = _final_ijar_path
output_jar_path = _final_ijar_path generated_jar_path = _generated_jar_path
generated_jar_path = _generated_jar_path deps = _annotation_processor_deps
deps = _annotation_processor_deps
}
} }
_compile_java_target = "${_main_target_name}__compile_java" _compile_java_target = "${_main_target_name}__compile_java"
compile_java_helper(_compile_java_target) { compile_java_helper(_compile_java_target) {
forward_variables_from(invoker, _compile_java_forward_variables) forward_variables_from(invoker, _compile_java_forward_variables)
output_jar_path = _javac_jar_path output_jar_path = _javac_jar_path
if (_enable_turbine) { deps = [ ":$_header_target_name" ]
deps = [ ":$_header_target_name" ] generated_jar_path = _generated_jar_path
generated_jar_path = _generated_jar_path
} else {
deps = _annotation_processor_deps
}
} }
if (_enable_errorprone) { if (_enable_errorprone) {
_compile_java_errorprone_target = "${_main_target_name}__errorprone" _compile_java_errorprone_target = "${_main_target_name}__errorprone"
...@@ -3624,12 +3610,8 @@ if (enable_java_templates) { ...@@ -3624,12 +3610,8 @@ if (enable_java_templates) {
} }
javac_args += invoker.errorprone_args javac_args += invoker.errorprone_args
} }
if (_enable_turbine) { deps = [ ":$_header_target_name" ]
deps = [ ":$_header_target_name" ] generated_jar_path = _generated_jar_path
generated_jar_path = _generated_jar_path
} else {
deps = _annotation_processor_deps
}
output_jar_path = "$target_out_dir/$target_name.errorprone.stamp" output_jar_path = "$target_out_dir/$target_name.errorprone.stamp"
} }
_analysis_public_deps += [ ":$_compile_java_errorprone_target" ] _analysis_public_deps += [ ":$_compile_java_errorprone_target" ]
...@@ -3637,7 +3619,7 @@ if (enable_java_templates) { ...@@ -3637,7 +3619,7 @@ if (enable_java_templates) {
} # _has_sources } # _has_sources
if (_is_prebuilt || _has_sources) { if (_is_prebuilt || _has_sources) {
if (!_enable_turbine) { if (_is_prebuilt) {
generate_interface_jar(_header_target_name) { generate_interface_jar(_header_target_name) {
# Always used the unfiltered .jar to create the interface jar so that # Always used the unfiltered .jar to create the interface jar so that
# other targets will resolve filtered classes when depending on # other targets will resolve filtered classes when depending on
......
...@@ -569,10 +569,6 @@ java_library("robolectric_shadowapi_java") { ...@@ -569,10 +569,6 @@ java_library("robolectric_shadowapi_java") {
java_library("shadows_core_java") { java_library("shadows_core_java") {
output_name = "shadows-core-3.2" 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 # Skip platform checks since we must depend on accessibility_test_framework_java
# here which requires_android. # here which requires_android.
bypass_platform_checks = true bypass_platform_checks = true
...@@ -1100,10 +1096,6 @@ java_library("shadows_multidex_java") { ...@@ -1100,10 +1096,6 @@ java_library("shadows_multidex_java") {
# here which requires_android. # here which requires_android.
bypass_platform_checks = true 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 testonly = true
enable_bytecode_checks = false enable_bytecode_checks = false
processor_args_javac = [ "org.robolectric.annotation.processing.shadowPackage=org.robolectric.shadows.multidex" ] processor_args_javac = [ "org.robolectric.annotation.processing.shadowPackage=org.robolectric.shadows.multidex" ]
...@@ -1146,10 +1138,6 @@ java_library("shadows_play_services_java") { ...@@ -1146,10 +1138,6 @@ java_library("shadows_play_services_java") {
# and google_play_services_library here which both requires_android. # and google_play_services_library here which both requires_android.
bypass_platform_checks = true 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 testonly = true
enable_bytecode_checks = false enable_bytecode_checks = false
processor_args_javac = [ "org.robolectric.annotation.processing.shadowPackage=org.robolectric.shadows.gms" ] 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