From 233ee2930b66063f5ef2372f1889fe7779925173 Mon Sep 17 00:00:00 2001 From: Googler Date: Mon, 3 Apr 2023 07:11:54 -0700 Subject: [PATCH] Automated rollback of commit 0d2e9dae9c64ef783fa79b5b97fe2682499e038e. *** Reason for rollback *** Rollforward - Regression with implicit deps when Automatic Exec Groups are enabled is fixed. *** Original change description *** Automated rollback of commit f548d56bc7f5c664fe6de5070a47e24720d35597. *** Reason for rollback *** Introduces regression on implicit dependencies. *** Original change description *** Flip Automatic Exec Groups inside java_library PiperOrigin-RevId: 521449702 Change-Id: Ic4d59c558d381a279326d83ce24b3540900e21b8 --- src/main/starlark/builtins_bzl/common/java/android_lint.bzl | 1 + src/main/starlark/builtins_bzl/common/java/java_library.bzl | 5 ++++- .../builtins_bzl/common/java/proguard_validation.bzl | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/starlark/builtins_bzl/common/java/android_lint.bzl b/src/main/starlark/builtins_bzl/common/java/android_lint.bzl index 24b1c8b35ee9aa..cd2b0fd540f269 100644 --- a/src/main/starlark/builtins_bzl/common/java/android_lint.bzl +++ b/src/main/starlark/builtins_bzl/common/java/android_lint.bzl @@ -127,5 +127,6 @@ def android_lint_action(ctx, source_files, source_jars, compilation_info): tools = tools, arguments = args_list, execution_requirements = {"supports-workers": "1"}, + toolchain = semantics.JAVA_TOOLCHAIN_TYPE, ) return android_lint_out diff --git a/src/main/starlark/builtins_bzl/common/java/java_library.bzl b/src/main/starlark/builtins_bzl/common/java/java_library.bzl index 7d64e2f054dcec..b38490f60db971 100644 --- a/src/main/starlark/builtins_bzl/common/java/java_library.bzl +++ b/src/main/starlark/builtins_bzl/common/java/java_library.bzl @@ -170,7 +170,10 @@ JAVA_LIBRARY_ATTRS = merge_attrs( java_library = rule( _proxy, - attrs = JAVA_LIBRARY_ATTRS, + attrs = merge_attrs( + JAVA_LIBRARY_ATTRS, + {"_use_auto_exec_groups": attr.bool(default = True)}, + ), provides = [JavaInfo], outputs = { "classjar": "lib%{name}.jar", diff --git a/src/main/starlark/builtins_bzl/common/java/proguard_validation.bzl b/src/main/starlark/builtins_bzl/common/java/proguard_validation.bzl index db8f9549ec34cc..d054990541db63 100644 --- a/src/main/starlark/builtins_bzl/common/java/proguard_validation.bzl +++ b/src/main/starlark/builtins_bzl/common/java/proguard_validation.bzl @@ -41,6 +41,7 @@ def _validate_spec(ctx, spec_file): arguments = [args], inputs = [spec_file], outputs = [validated_proguard_spec], + toolchain = Label(semantics.JAVA_TOOLCHAIN_TYPE), ) return validated_proguard_spec