From f548d56bc7f5c664fe6de5070a47e24720d35597 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 15 Mar 2023 06:31:52 -0700 Subject: [PATCH] Flip Automatic Exec Groups inside java_library PiperOrigin-RevId: 516808534 Change-Id: I232fe94137498c4c83deecabee40a4e3146da0db --- 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