Search in sources :

Example 1 with DefaultDependentBinariesResolvedResult

use of org.gradle.platform.base.internal.dependents.DefaultDependentBinariesResolvedResult in project gradle by gradle.

the class NativeDependentBinariesResolutionStrategy method doBuildResolvedResult.

private List<DependentBinariesResolvedResult> doBuildResolvedResult(final NativeBinarySpecInternal target, State state, Deque<NativeBinarySpecInternal> stack) {
    if (stack.contains(target)) {
        onCircularDependencies(state, stack, target);
    }
    List<DependentBinariesResolvedResult> result = resultsCache.getIfPresent(target);
    if (result != null) {
        return result;
    }
    stack.push(target);
    result = Lists.newArrayList();
    List<NativeBinarySpecInternal> dependents = state.getDependents(target);
    for (NativeBinarySpecInternal dependent : dependents) {
        List<DependentBinariesResolvedResult> children = doBuildResolvedResult(dependent, state, stack);
        result.add(new DefaultDependentBinariesResolvedResult(dependent.getId(), dependent.getProjectScopedName(), dependent.isBuildable(), isTestSuite(dependent), children));
    }
    stack.pop();
    resultsCache.put(target, result);
    return result;
}
Also used : DependentBinariesResolvedResult(org.gradle.platform.base.internal.dependents.DependentBinariesResolvedResult) DefaultDependentBinariesResolvedResult(org.gradle.platform.base.internal.dependents.DefaultDependentBinariesResolvedResult) DefaultDependentBinariesResolvedResult(org.gradle.platform.base.internal.dependents.DefaultDependentBinariesResolvedResult)

Aggregations

DefaultDependentBinariesResolvedResult (org.gradle.platform.base.internal.dependents.DefaultDependentBinariesResolvedResult)1 DependentBinariesResolvedResult (org.gradle.platform.base.internal.dependents.DependentBinariesResolvedResult)1