aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2017-09-15 02:21:34 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-09-15 11:29:17 +0200
commit7b8b1166646e48fb7ceae87477af16a68c9d8082 (patch)
tree9d99f0499362ad3fc023df3dc454730d0a72a46c /src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java
parentaa0ca5baf0f34907a1cae0c062658490fef95ecf (diff)
Avoid nested set expansion for deploy archives.
android_local_test and java_test/java_binary do not need to flatten their nested sets because they do not have a jar mapping. android_test and android_binary still flatten because of desugaring. RELNOTES: None PiperOrigin-RevId: 168771671
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java
index 9e2e719532..f83d0fe82e 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaSemantics.java
@@ -33,6 +33,7 @@ import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.devtools.build.lib.analysis.actions.CustomCommandLine;
import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
import com.google.devtools.build.lib.cmdline.Label;
+import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.packages.Attribute.LateBoundLabel;
import com.google.devtools.build.lib.packages.Attribute.LateBoundLabelList;
@@ -277,14 +278,20 @@ public interface JavaSemantics {
ImmutableList<Artifact> collectResources(RuleContext ruleContext);
/**
- * Constructs the command line to call SingleJar to join all artifacts from
- * {@code classpath} (java code) and {@code resources} into {@code output}.
+ * Constructs the command line to call SingleJar to join all artifacts from {@code classpath}
+ * (java code) and {@code resources} into {@code output}.
*/
- CustomCommandLine buildSingleJarCommandLine(BuildConfiguration configuration,
- Artifact output, String mainClass, ImmutableList<String> manifestLines,
- Iterable<Artifact> buildInfoFiles, ImmutableList<Artifact> resources,
- Iterable<Artifact> classpath, boolean includeBuildData,
- Compression compression, Artifact launcher);
+ CustomCommandLine buildSingleJarCommandLine(
+ BuildConfiguration configuration,
+ Artifact output,
+ String mainClass,
+ ImmutableList<String> manifestLines,
+ Iterable<Artifact> buildInfoFiles,
+ ImmutableList<Artifact> resources,
+ NestedSet<Artifact> classpath,
+ boolean includeBuildData,
+ Compression compression,
+ Artifact launcher);
/**
* Creates the action that writes the Java executable stub script.