diff options
author | Ulf Adams <ulfjack@google.com> | 2016-02-22 09:19:47 +0000 |
---|---|---|
committer | Lukacs Berki <lberki@google.com> | 2016-02-22 16:08:47 +0000 |
commit | d27f5716cf5c07e6b080aaa3efd7f2c5353c9c26 (patch) | |
tree | 7d177335a5a79732a8029345dfe7d956dbc4c751 /src/main | |
parent | f01911cefeafd21c4bd2d1a8fdb1b6f2c956e505 (diff) |
Move the static getHostJavabaseInputs variant to JavaHelper.
--
MOS_MIGRATED_REVID=115201919
Diffstat (limited to 'src/main')
5 files changed, 14 insertions, 14 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/BaseJavaCompilationHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/BaseJavaCompilationHelper.java index a00ed930cf..0811f6b807 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/BaseJavaCompilationHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/BaseJavaCompilationHelper.java @@ -69,16 +69,6 @@ public class BaseJavaCompilationHelper { * Returns the artifacts required to invoke {@code javahome} relative binary * in the action. */ - public static NestedSet<Artifact> getHostJavabaseInputs(RuleContext ruleContext) { - // This must have a different name than above, because the middleman creation uses the rule's - // configuration, although it should use the host configuration. - return AnalysisUtils.getMiddlemanFor(ruleContext, ":host_jdk"); - } - - /** - * Returns the artifacts required to invoke {@code javahome} relative binary - * in the action. - */ public NestedSet<Artifact> getHostJavabaseInputsNonStatic(RuleContext ruleContext) { // This must have a different name than above, because the middleman creation uses the rule's // configuration, although it should use the host configuration. diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/DeployArchiveBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/java/DeployArchiveBuilder.java index 6c487f86bf..9ed1d83b69 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/DeployArchiveBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/DeployArchiveBuilder.java @@ -239,7 +239,7 @@ public class DeployArchiveBuilder { ruleContext.registerAction(new SpawnAction.Builder() .addInputs(inputs.build()) - .addTransitiveInputs(JavaCompilationHelper.getHostJavabaseInputs(ruleContext)) + .addTransitiveInputs(JavaHelper.getHostJavabaseInputs(ruleContext)) .addOutput(outputJar) .setResources(resourceSet) .setJarExecutable( diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java index 671224ae46..9408d701e2 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHeaderCompileActionBuilder.java @@ -229,7 +229,7 @@ public class JavaHeaderCompileActionBuilder { builder.useParameterFile(ParameterFileType.SHELL_QUOTED); builder.setCommandLine(buildCommandLine(ruleContext.getConfiguration().getHostPathSeparator())); - builder.addTransitiveInputs(JavaCompilationHelper.getHostJavabaseInputs(ruleContext)); + builder.addTransitiveInputs(JavaHelper.getHostJavabaseInputs(ruleContext)); builder.addInputs(classpathEntries); builder.addInputs(bootclasspathEntries); builder.addInputs(processorPath); diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHelper.java index 8a702e3cc1..75ba880025 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaHelper.java @@ -14,9 +14,11 @@ package com.google.devtools.build.lib.rules.java; import com.google.devtools.build.lib.actions.Artifact; +import com.google.devtools.build.lib.analysis.AnalysisUtils; import com.google.devtools.build.lib.analysis.RuleConfiguredTarget.Mode; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; +import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.packages.BuildType; import com.google.devtools.build.lib.shell.ShellUtils; import com.google.devtools.build.lib.syntax.Type; @@ -123,4 +125,12 @@ public abstract class JavaHelper { return rootRelativePath.relativeTo(prefix); } + + /** + * Returns the artifacts required to invoke {@code javahome} relative binary + * in the action. + */ + public static NestedSet<Artifact> getHostJavabaseInputs(RuleContext ruleContext) { + return AnalysisUtils.getMiddlemanFor(ruleContext, ":host_jdk"); + } } diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcAspect.java b/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcAspect.java index 5103e5640a..a16ab74cd4 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcAspect.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/J2ObjcAspect.java @@ -45,7 +45,7 @@ import com.google.devtools.build.lib.packages.BuildType; import com.google.devtools.build.lib.rules.apple.AppleConfiguration; import com.google.devtools.build.lib.rules.apple.AppleToolchain; import com.google.devtools.build.lib.rules.java.JavaCompilationArgsProvider; -import com.google.devtools.build.lib.rules.java.JavaCompilationHelper; +import com.google.devtools.build.lib.rules.java.JavaHelper; import com.google.devtools.build.lib.rules.java.JavaSourceInfoProvider; import com.google.devtools.build.lib.rules.java.Jvm; import com.google.devtools.build.lib.rules.objc.J2ObjcSource.SourceType; @@ -276,7 +276,7 @@ public class J2ObjcAspect implements ConfiguredNativeAspectFactory { .addInput(j2ObjcDeployJar) .addInputs(sources) .addTransitiveInputs(compileTimeJars) - .addInputs(JavaCompilationHelper.getHostJavabaseInputs(ruleContext)) + .addInputs(JavaHelper.getHostJavabaseInputs(ruleContext)) .addTransitiveInputs(depsHeaderMappingFiles) .addTransitiveInputs(depsClassMappingFiles) .addInput(paramFile) |