diff --git a/src/com/facebook/buck/android/AbstractAndroidAppModularityGraphEnhancementResult.java b/src/com/facebook/buck/android/AbstractAndroidAppModularityGraphEnhancementResult.java index e376972dfbd..5bfe6c4a251 100644 --- a/src/com/facebook/buck/android/AbstractAndroidAppModularityGraphEnhancementResult.java +++ b/src/com/facebook/buck/android/AbstractAndroidAppModularityGraphEnhancementResult.java @@ -18,6 +18,8 @@ import com.facebook.buck.android.apkmodule.APKModuleGraph; import com.facebook.buck.android.packageable.AndroidPackageableCollection; +import com.facebook.buck.rules.AddToRuleKey; +import com.facebook.buck.rules.AddsToRuleKey; import com.facebook.buck.rules.BuildRule; import com.facebook.buck.util.immutables.BuckStyleImmutable; import com.google.common.collect.ImmutableSortedSet; @@ -25,11 +27,13 @@ @Value.Immutable @BuckStyleImmutable -interface AbstractAndroidAppModularityGraphEnhancementResult { +abstract class AbstractAndroidAppModularityGraphEnhancementResult implements AddsToRuleKey { - AndroidPackageableCollection getPackageableCollection(); + public abstract AndroidPackageableCollection getPackageableCollection(); - ImmutableSortedSet getFinalDeps(); + @AddToRuleKey + public abstract ImmutableSortedSet getFinalDeps(); - APKModuleGraph getAPKModuleGraph(); + @AddToRuleKey + public abstract APKModuleGraph getAPKModuleGraph(); } diff --git a/src/com/facebook/buck/android/AndroidAppModularity.java b/src/com/facebook/buck/android/AndroidAppModularity.java index a15a9da5932..2e8e69b912b 100644 --- a/src/com/facebook/buck/android/AndroidAppModularity.java +++ b/src/com/facebook/buck/android/AndroidAppModularity.java @@ -22,6 +22,7 @@ import com.facebook.buck.model.BuildTarget; import com.facebook.buck.model.BuildTargets; import com.facebook.buck.rules.AbstractBuildRuleWithDeclaredAndExtraDeps; +import com.facebook.buck.rules.AddToRuleKey; import com.facebook.buck.rules.BuildContext; import com.facebook.buck.rules.BuildRuleParams; import com.facebook.buck.rules.BuildableContext; @@ -38,7 +39,7 @@ public class AndroidAppModularity extends AbstractBuildRuleWithDeclaredAndExtraDeps { - protected final AndroidAppModularityGraphEnhancementResult result; + @AddToRuleKey private final AndroidAppModularityGraphEnhancementResult result; AndroidAppModularity( BuildTarget buildTarget, diff --git a/src/com/facebook/buck/android/apkmodule/APKModuleGraph.java b/src/com/facebook/buck/android/apkmodule/APKModuleGraph.java index 0a9e3adf667..d3c61d732fb 100644 --- a/src/com/facebook/buck/android/apkmodule/APKModuleGraph.java +++ b/src/com/facebook/buck/android/apkmodule/APKModuleGraph.java @@ -25,6 +25,8 @@ import com.facebook.buck.jvm.java.classes.DefaultClasspathTraverser; import com.facebook.buck.jvm.java.classes.FileLike; import com.facebook.buck.model.BuildTarget; +import com.facebook.buck.rules.AddToRuleKey; +import com.facebook.buck.rules.AddsToRuleKey; import com.facebook.buck.rules.TargetGraph; import com.facebook.buck.rules.TargetNode; import com.facebook.buck.util.MoreCollectors; @@ -57,13 +59,13 @@ * the root. Targets that are dependencies of two or more groups but not dependencies of the root * are added to their own group. */ -public class APKModuleGraph { +public class APKModuleGraph implements AddsToRuleKey { public static final String ROOT_APKMODULE_NAME = "dex"; private final TargetGraph targetGraph; - private final BuildTarget target; - private final Optional>> suppliedSeedConfigMap; + @AddToRuleKey private final BuildTarget target; + @AddToRuleKey private final Optional>> suppliedSeedConfigMap; private final Optional> seedTargets; private final Map> buildTargetsMap = new HashMap<>();