|
55 | 55 | import com.facebook.buck.util.RichStream;
|
56 | 56 | import com.google.common.annotations.VisibleForTesting;
|
57 | 57 | import com.google.common.base.Preconditions;
|
58 |
| -import com.google.common.base.Suppliers; |
59 | 58 | import com.google.common.collect.ImmutableList;
|
60 | 59 | import com.google.common.collect.ImmutableSet;
|
61 | 60 | import com.google.common.collect.ImmutableSortedSet;
|
|
65 | 64 | import java.util.Optional;
|
66 | 65 | import java.util.Set;
|
67 | 66 | import java.util.SortedSet;
|
68 |
| -import java.util.function.Supplier; |
69 | 67 | import java.util.stream.Stream;
|
70 | 68 |
|
71 | 69 | /**
|
@@ -118,8 +116,6 @@ public class AndroidBinary extends AbstractBuildRule
|
118 | 116 |
|
119 | 117 | private final BuildRuleParams buildRuleParams;
|
120 | 118 |
|
121 |
| - private final Supplier<ImmutableSet<BuildRule>> classpathDepsSupplier; |
122 |
| - |
123 | 119 | @AddToRuleKey private final AndroidBinaryBuildable buildable;
|
124 | 120 |
|
125 | 121 | // TODO(cjhopman): What's the difference between shouldProguard and skipProguard?
|
@@ -233,17 +229,11 @@ public class AndroidBinary extends AbstractBuildRule
|
233 | 229 | true);
|
234 | 230 | this.exopackageInfo = exopackageInfo;
|
235 | 231 |
|
236 |
| - this.classpathDepsSupplier = |
237 |
| - Suppliers.memoize( |
238 |
| - () -> ruleFinder.filterBuildRuleInputs(enhancementResult.getClasspathEntriesToDex())); |
239 |
| - |
240 | 232 | params =
|
241 |
| - new BuildRuleParams( |
242 |
| - ImmutableSortedSet::of, |
| 233 | + params.withExtraDeps( |
243 | 234 | () ->
|
244 | 235 | BuildableSupport.deriveDeps(this, ruleFinder)
|
245 |
| - .collect(ImmutableSortedSet.toImmutableSortedSet(Ordering.natural())), |
246 |
| - params.getTargetGraphOnlyDeps()); |
| 236 | + .collect(ImmutableSortedSet.toImmutableSortedSet(Ordering.natural()))); |
247 | 237 | this.buildRuleParams = params;
|
248 | 238 | }
|
249 | 239 |
|
@@ -365,8 +355,8 @@ public Keystore getKeystore() {
|
365 | 355 | return keystore;
|
366 | 356 | }
|
367 | 357 |
|
368 |
| - public ImmutableSet<BuildRule> getClasspathDeps() { |
369 |
| - return classpathDepsSupplier.get(); |
| 358 | + public SortedSet<BuildRule> getClasspathDeps() { |
| 359 | + return getDeclaredDeps(); |
370 | 360 | }
|
371 | 361 |
|
372 | 362 | @Override
|
|
0 commit comments