aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspect.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2015-09-26 20:35:57 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-09-28 11:39:56 +0000
commit22616ae8ea53df3909fd16b74e0d9210138dc2c2 (patch)
tree42740e6f6eba481ff858d7e48cc1605ece0ddb92 /src/main/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspect.java
parenta72be0f1d68ec449d463f825afa0aaabc4f05246 (diff)
Add Android IDL jar outputs.
These outputs are a jar and source jar for the results of aidl processing. This is used to add aidl output to IDEs separate from the source code, similar to annotation output (gen jars). -- MOS_MIGRATED_REVID=104024453
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspect.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspect.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspect.java b/src/main/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspect.java
index a88f4a8646..2db796563d 100644
--- a/src/main/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/ideinfo/AndroidStudioInfoAspect.java
@@ -260,6 +260,21 @@ public class AndroidStudioInfoAspect implements ConfiguredAspectFactory {
builder.addTransitiveResources(makeArtifactLocation(transitiveResource));
}
+ boolean hasIdlSources = !provider.getIdlSrcs().isEmpty();
+ builder.setHasIdlSources(hasIdlSources);
+ if (hasIdlSources) {
+ LibraryArtifact.Builder jarBuilder = LibraryArtifact.newBuilder();
+ Artifact idlClassJar = provider.getIdlClassJar();
+ if (idlClassJar != null) {
+ jarBuilder.setJar(makeArtifactLocation(idlClassJar));
+ }
+ Artifact idlSourceJar = provider.getIdlSourceJar();
+ if (idlSourceJar != null) {
+ jarBuilder.setSourceJar(makeArtifactLocation(idlSourceJar));
+ }
+ builder.setIdlJar(jarBuilder.build());
+ }
+
return builder.build();
}