diff options
author | 2018-05-03 12:51:55 -0700 | |
---|---|---|
committer | 2018-05-03 12:53:41 -0700 | |
commit | 8aa610bb7fce80440a563f91b32783716f51e77d (patch) | |
tree | bf088c908ff160feb2d3e901e70eba702a6b9db9 /src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesInfo.java | |
parent | 807bdbc722c8318548a1e0952053de32f7ef96b6 (diff) |
Methods for generating empty Android data providers
RELNOTES: none
PiperOrigin-RevId: 195296176
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.java | 31 |
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", |