From 4a55d41405be2e579d7e6550193a2ecdd27997ac Mon Sep 17 00:00:00 2001 From: cushon Date: Thu, 31 Jan 2019 16:47:17 -0800 Subject: [PATCH] Make JavaRuntimeInfo extend ToolchainInfo, and delete JavaRuntimeToolchainInfo PiperOrigin-RevId: 231880172 --- .../devtools/build/lib/rules/java/BUILD | 2 +- .../rules/java/JavaHostRuntimeAliasRule.java | 3 +- .../build/lib/rules/java/JavaRuleClasses.java | 4 +- .../build/lib/rules/java/JavaRuntime.java | 1 - .../lib/rules/java/JavaRuntimeAliasRule.java | 3 +- .../build/lib/rules/java/JavaRuntimeInfo.java | 18 +++----- .../rules/java/JavaRuntimeToolchainInfo.java | 43 ------------------- .../lib/rules/java/JavaSkylarkCommon.java | 5 ++- .../rules/java/proto/JavaLiteProtoAspect.java | 4 +- .../java/JavaRuntimeInfoApi.java | 8 ++-- 10 files changed, 22 insertions(+), 69 deletions(-) delete mode 100644 src/main/java/com/google/devtools/build/lib/rules/java/JavaRuntimeToolchainInfo.java diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/BUILD b/src/main/java/com/google/devtools/build/lib/rules/java/BUILD index b4b6d2bd6b3442..55b715c2bd4bfb 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/BUILD +++ b/src/main/java/com/google/devtools/build/lib/rules/java/BUILD @@ -57,6 +57,7 @@ java_library( "//src/main/java/com/google/devtools/build/lib:skylarkinterface", "//src/main/java/com/google/devtools/build/lib:util", "//src/main/java/com/google/devtools/build/lib/actions", + "//src/main/java/com/google/devtools/build/lib/analysis/platform", "//src/main/java/com/google/devtools/build/lib/collect/nestedset", "//src/main/java/com/google/devtools/build/lib/concurrent", "//src/main/java/com/google/devtools/build/lib/rules/cpp", @@ -106,7 +107,6 @@ java_library( "JavaRuleOutputJarsProvider.java", "JavaRunfilesProvider.java", "JavaRuntimeInfo.java", - "JavaRuntimeToolchainInfo.java", "JavaSemantics.java", "JavaSkylarkApiProvider.java", "JavaSkylarkCommon.java", diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHostRuntimeAliasRule.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHostRuntimeAliasRule.java index df2921454966af..033ea61d5cfb29 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHostRuntimeAliasRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHostRuntimeAliasRule.java @@ -16,6 +16,7 @@ import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment; import com.google.devtools.build.lib.analysis.config.HostTransition; +import com.google.devtools.build.lib.analysis.platform.ToolchainInfo; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.packages.Attribute; import com.google.devtools.build.lib.rules.LateBoundAlias.CommonAliasRule; @@ -29,6 +30,6 @@ public JavaHostRuntimeAliasRule() { @Override protected Attribute.Builder