org.gradle.api.artifacts.DependencyResolveDetails Java Examples

The following examples show how to use org.gradle.api.artifacts.DependencyResolveDetails. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultResolutionStrategy.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public DefaultResolutionStrategy copy() {
    DefaultResolutionStrategy out = new DefaultResolutionStrategy(cachePolicy.copy(),
            new LinkedHashSet<Action<? super DependencyResolveDetails>>(dependencyResolveRules));

    if (conflictResolution instanceof StrictConflictResolution) {
        out.failOnVersionConflict();
    }
    out.setForcedModules(getForcedModules());
    return out;
}
 
Example #2
Source File: PyGradleDependencyResolveDetails.java    From pygradle with Apache License 2.0 5 votes vote down vote up
@Override
public void execute(DependencyResolveDetails details) {
    if (requiredVersions.containsKey(details.getRequested().getName())) {
        String name = details.getRequested().getName();
        String version = requiredVersions.get(name).get("version");
        if (Objects.equals("", version) || null == version) {
            return;
        }
        LOGGER.info("Resolving {} to {}=={} per gradle-python resolution strategy.", name, name, version);
        details.useVersion(version);
    }
}
 
Example #3
Source File: DefaultResolutionStrategy.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public DefaultResolutionStrategy copy() {
    DefaultResolutionStrategy out = new DefaultResolutionStrategy(cachePolicy.copy(),
            new LinkedHashSet<Action<? super DependencyResolveDetails>>(dependencyResolveRules));

    if (conflictResolution instanceof StrictConflictResolution) {
        out.failOnVersionConflict();
    }
    out.setForcedModules(getForcedModules());
    return out;
}
 
Example #4
Source File: DefaultResolutionStrategy.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultResolutionStrategy() {
    this(new DefaultCachePolicy(), new LinkedHashSet<Action<? super DependencyResolveDetails>>());
}
 
Example #5
Source File: DefaultResolutionStrategy.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
DefaultResolutionStrategy(DefaultCachePolicy cachePolicy, Set<Action<? super DependencyResolveDetails>> dependencyResolveRules) {
    this.cachePolicy = cachePolicy;
    this.dependencyResolveRules = dependencyResolveRules;
}
 
Example #6
Source File: DefaultResolutionStrategy.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResolutionStrategy eachDependency(Action<? super DependencyResolveDetails> rule) {
    dependencyResolveRules.add(rule);
    return this;
}
 
Example #7
Source File: DefaultResolutionStrategy.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public DefaultResolutionStrategy() {
    this(new DefaultCachePolicy(), new LinkedHashSet<Action<? super DependencyResolveDetails>>());
}
 
Example #8
Source File: DefaultResolutionStrategy.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
DefaultResolutionStrategy(DefaultCachePolicy cachePolicy, Set<Action<? super DependencyResolveDetails>> dependencyResolveRules) {
    this.cachePolicy = cachePolicy;
    this.dependencyResolveRules = dependencyResolveRules;
}
 
Example #9
Source File: DefaultResolutionStrategy.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public ResolutionStrategy eachDependency(Action<? super DependencyResolveDetails> rule) {
    dependencyResolveRules.add(rule);
    return this;
}