public StripDebugSymbolTransform( @NonNull Project project, @NonNull NdkHandler ndkHandler, @NonNull Set<String> excludePattern) { this.excludeMatchers = excludePattern.stream() .map(StripDebugSymbolTransform::compileGlob) .collect(ImmutableCollectors.toImmutableSet()); checkArgument(ndkHandler.isConfigured()); for(Abi abi : ndkHandler.getSupportedAbis()) { stripExecutables.put(abi, ndkHandler.getStripExecutable(abi)); } this.project = project; }
/** * Returns a version of this container where the skipped libraries have been removed. * * This shares the {@link MutableDependencyDataMap} instance of the original * {@link DependencyGraph} instance. * * @return the filtered container. */ @NonNull DependencyContainer filterSkippedLibraries() { return new DependencyContainerImpl( dependencyGraph.getDependencyMap(), dependencyGraph.getDependencies(), mutableDependencyDataMap, allDependencies.stream().filter(dependency -> !mutableDependencyDataMap.isSkipped(dependency)) .collect(ImmutableCollectors.toImmutableList()), directDependencies.stream().filter(dependency -> !mutableDependencyDataMap.isSkipped(dependency)) .collect(ImmutableCollectors.toImmutableList()), baseAtom); } }