diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java index 03c6a594a3..8056e7cb0d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java @@ -95,10 +95,6 @@ public class JavaBinary implements RuleConfiguredTargetFactory { } } - List<TransitiveInfoCollection> deps = - // Do not remove <TransitiveInfoCollection>: workaround for Java 7 type inference. - Lists.<TransitiveInfoCollection>newArrayList( - common.targetsTreatedAsDeps(ClasspathType.COMPILE_ONLY)); semantics.checkRule(ruleContext, common); semantics.checkForProtoLibraryAndJavaProtoLibraryOnSameProto(ruleContext, common); String mainClass = semantics.getMainClass(ruleContext, common.getSrcsArtifacts()); @@ -110,6 +106,10 @@ public class JavaBinary implements RuleConfiguredTargetFactory { // Collect the transitive dependencies. JavaCompilationHelper helper = new JavaCompilationHelper( ruleContext, semantics, common.getJavacOpts(), attributesBuilder); + List<TransitiveInfoCollection> deps = + // Do not remove <TransitiveInfoCollection>: workaround for Java 7 type inference. + Lists.<TransitiveInfoCollection>newArrayList( + common.targetsTreatedAsDeps(ClasspathType.COMPILE_ONLY)); helper.addLibrariesToAttributes(deps); attributesBuilder.addNativeLibraries( collectNativeLibraries(common.targetsTreatedAsDeps(ClasspathType.BOTH))); |