aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesInfo.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesInfo.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesInfo.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesInfo.java
index 4af26bff72..6f1d665be4 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesInfo.java
@@ -36,7 +36,26 @@ public class AndroidResourcesInfo extends NativeInfo {
public static final NativeProvider<AndroidResourcesInfo> PROVIDER =
new NativeProvider<AndroidResourcesInfo>(AndroidResourcesInfo.class, SKYLARK_NAME) {};
+ /*
+ * Local information about the target that produced this provider, for tooling. These values will
+ * be made available even if they should not be inherited (for example, if this target has
+ * "neverlink" set) - do not inherit them directly.
+ */
+
+ // Lets us know where the provider came from
private final Label label;
+
+ // An updated manifest - resource processing sometimes does additional manifest processing
+ // TODO(b/30817309): Remove this once resource processing no longer does manifest processing
+ private final ProcessedAndroidManifest manifest;
+
+ // An R.txt file containing a list of all transitive resources this target expected
+ private final Artifact rTxt;
+
+ /*
+ * Transitive information used for resource processing
+ */
+
private final NestedSet<ValidatedAndroidData> transitiveAndroidResources;
private final NestedSet<ValidatedAndroidData> directAndroidResources;
private final NestedSet<Artifact> transitiveResources;
@@ -50,6 +69,8 @@ public class AndroidResourcesInfo extends NativeInfo {
AndroidResourcesInfo(
Label label,
+ ProcessedAndroidManifest manifest,
+ Artifact rTxt,
NestedSet<ValidatedAndroidData> transitiveAndroidResources,
NestedSet<ValidatedAndroidData> directAndroidResources,
NestedSet<Artifact> transitiveResources,
@@ -62,6 +83,8 @@ public class AndroidResourcesInfo extends NativeInfo {
NestedSet<Artifact> transitiveRTxt) {
super(PROVIDER);
this.label = label;
+ this.manifest = manifest;
+ this.rTxt = rTxt;
this.transitiveAndroidResources = transitiveAndroidResources;
this.directAndroidResources = directAndroidResources;
this.transitiveResources = transitiveResources;
@@ -80,6 +103,14 @@ public class AndroidResourcesInfo extends NativeInfo {
return label;
}
+ public ProcessedAndroidManifest getManifest() {
+ return manifest;
+ }
+
+ public Artifact getRTxt() {
+ return rTxt;
+ }
+
/** Returns the transitive ResourceContainers for the label. */
@SkylarkCallable(
name = "transitive_android_resources",