aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AssetDependencies.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AssetDependencies.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AssetDependencies.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AssetDependencies.java b/src/main/java/com/google/devtools/build/lib/rules/android/AssetDependencies.java
index ef088993a8..cc9c8dc5ae 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AssetDependencies.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AssetDependencies.java
@@ -39,14 +39,19 @@ public class AssetDependencies {
private final NestedSet<Artifact> transitiveSymbols;
static AssetDependencies fromRuleDeps(RuleContext ruleContext, boolean neverlink) {
+ return fromProviders(
+ AndroidCommon.getTransitivePrerequisites(
+ ruleContext, Mode.TARGET, AndroidAssetsInfo.PROVIDER),
+ neverlink);
+ }
+
+ static AssetDependencies fromProviders(Iterable<AndroidAssetsInfo> providers, boolean neverlink) {
NestedSetBuilder<ParsedAndroidAssets> direct = NestedSetBuilder.naiveLinkOrder();
NestedSetBuilder<ParsedAndroidAssets> transitive = NestedSetBuilder.naiveLinkOrder();
NestedSetBuilder<Artifact> assets = NestedSetBuilder.naiveLinkOrder();
NestedSetBuilder<Artifact> symbols = NestedSetBuilder.naiveLinkOrder();
- for (AndroidAssetsInfo info :
- AndroidCommon.getTransitivePrerequisites(
- ruleContext, Mode.TARGET, AndroidAssetsInfo.PROVIDER)) {
+ for (AndroidAssetsInfo info : providers) {
direct.addTransitive(info.getDirectParsedAssets());
transitive.addTransitive(info.getTransitiveParsedAssets());
assets.addTransitive(info.getAssets());