aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar Liam Miller-Cushon <cushon@google.com>2016-08-06 01:36:08 +0000
committerGravatar Yue Gan <yueg@google.com>2016-08-08 08:08:20 +0000
commit2a87f5c14d78b6acdfdcecd393ab38d4188e3d68 (patch)
tree9e2fb1ef21fdde7fc6d67b1a63f203b2bcecea0b /src/main/java/com/google/devtools/build
parent66cadd3d1c6014799616ba22f9d1381a82006c48 (diff)
Fix handling of jdeps files in android_* rules
If header compilation is enabled, the compile-time dependency information is produced by the header compilation action. The android rules were incorrectly using the dependency information from the regular compilation, which defeated the critical path improvement from header compilation. -- MOS_MIGRATED_REVID=129505189
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
index 60c32e840d..688c5c5dd6 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidCommon.java
@@ -69,12 +69,10 @@ import com.google.devtools.build.lib.rules.java.SourcesJavaCompilationArgsProvid
import com.google.devtools.build.lib.rules.test.InstrumentedFilesCollector.InstrumentationSpec;
import com.google.devtools.build.lib.syntax.Type;
import com.google.devtools.build.lib.vfs.PathFragment;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
-
import javax.annotation.Nullable;
/**
@@ -641,14 +639,17 @@ public class AndroidCommon {
helper.createCompileActionWithInstrumentation(classJar, manifestProtoOutput, genSourceJar,
outputDepsProto, javaArtifactsBuilder);
- compileTimeDependencyArtifacts =
- javaCommon.collectCompileTimeDependencyArtifacts(outputDepsProto);
filesToBuild = filesBuilder.build();
if ((attributes.hasSourceFiles() || attributes.hasSourceJars()) && jar != null) {
iJar = helper.createCompileTimeJarAction(jar, javaArtifactsBuilder);
}
- javaCommon.setJavaCompilationArtifacts(javaArtifactsBuilder.build());
+
+ JavaCompilationArtifacts javaArtifacts = javaArtifactsBuilder.build();
+ compileTimeDependencyArtifacts =
+ javaCommon.collectCompileTimeDependencyArtifacts(
+ javaArtifacts.getCompileTimeDependencyArtifact());
+ javaCommon.setJavaCompilationArtifacts(javaArtifacts);
javaCommon.setClassPathFragment(
new ClasspathConfiguredFragment(