Java 类org.gradle.api.artifacts.DependencyResolveDetails 实例源码

项目:srcdeps-gradle-plugin    文件:SrcdepsResolver.java   
@Override
public void execute(DependencyResolveDetails dep) {
    ModuleVersionSelector requested = dep.getRequested();
    final String version = requested.getVersion();
    if (SrcVersion.isSrcVersion(version)) {
        final SrcdepsService srcdepsService = Wiring.getInjector().getInstance(SrcdepsService.class);
        srcdepsService.buildIfNecessary(requested.getGroup(), requested.getName(), version);
    }
}
项目:Pushjet-Android    文件:DefaultResolutionStrategy.java   
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;
}
项目:aether-gradle-plugin    文件:VersionResolverDependencyResolveDetails.java   
@Override
public void execute(DependencyResolveDetails dependencyResolveDetails) {
    String group = dependencyResolveDetails.getTarget().getGroup();
    String name = dependencyResolveDetails.getTarget().getName();
    if (aetherPlugin.getVersionMap().containsKey(group) && aetherPlugin.getVersionMap().get(group).containsKey(name)) {
        if (dependencyResolveDetails.getRequested().getVersion().equals(dependencyResolveDetails.getTarget().getVersion())) {
            dependencyResolveDetails.useVersion(aetherPlugin.getVersionMap().get(group).get(name));
        }
    } else {
        RepositorySystem system = setupRepositorySystem();
        RepositorySystemSession session = setupSession(project, system);
        List<RemoteRepository> remoteRepositories = new ArrayList<>();
        for (ArtifactRepository artifactRepository : project.getRepositories()) {
            if (artifactRepository instanceof MavenArtifactRepository) {
                MavenArtifactRepository mavenArtifactRepository = (MavenArtifactRepository) artifactRepository;
                remoteRepositories.add(new RemoteRepository.Builder(mavenArtifactRepository.getName(), "default", mavenArtifactRepository.getUrl().toString()).build());
            }
        }
        Artifact artifact = new DefaultArtifact(dependencyResolveDetails.getTarget().getGroup()
                + ":" + dependencyResolveDetails.getTarget().getName()
                + ":" + dependencyResolveDetails.getTarget().getVersion());

        CollectRequest collectRequest = new CollectRequest();
        String scope;
        if (configuration.getName().contains("test")) {
            scope = JavaScopes.TEST;
        } else if (configuration.getName().contains("runtime")) {
            scope = JavaScopes.RUNTIME;
        } else if (configuration.getName().equals("providedCompile")
                || configuration.getName().equals("compileOnly")) {
            scope = JavaScopes.PROVIDED;
        } else
            scope = JavaScopes.COMPILE;
        collectRequest.setRoot(new Dependency(artifact, scope));
        collectRequest.setRepositories(remoteRepositories);

        try {
            CollectResult collectResult = system.collectDependencies(session, collectRequest);
            processDependencyNode(collectResult.getRoot());
        } catch (DependencyCollectionException e) {
            e.printStackTrace();
        }
    }
}
项目:Reer    文件:DefaultResolutionStrategy.java   
public ResolutionStrategy eachDependency(Action<? super DependencyResolveDetails> rule) {
    mutationValidator.validateMutation(STRATEGY);
    dependencySubstitutions.allWithDependencyResolveDetails(rule);
    return this;
}
项目:Reer    文件:DefaultDependencySubstitutions.java   
@Override
public DependencySubstitutions allWithDependencyResolveDetails(Action<? super DependencyResolveDetails> rule) {
    addRule(new DependencyResolveDetailsWrapperAction(rule));
    return this;
}
项目:Reer    文件:DefaultDependencySubstitutions.java   
public DependencyResolveDetailsWrapperAction(Action<? super DependencyResolveDetails> delegate) {
    this.delegate = delegate;
}
项目:Pushjet-Android    文件:DefaultResolutionStrategy.java   
public DefaultResolutionStrategy() {
    this(new DefaultCachePolicy(), new LinkedHashSet<Action<? super DependencyResolveDetails>>());
}
项目:Pushjet-Android    文件:DefaultResolutionStrategy.java   
DefaultResolutionStrategy(DefaultCachePolicy cachePolicy, Set<Action<? super DependencyResolveDetails>> dependencyResolveRules) {
    this.cachePolicy = cachePolicy;
    this.dependencyResolveRules = dependencyResolveRules;
}
项目:Pushjet-Android    文件:DefaultResolutionStrategy.java   
public ResolutionStrategy eachDependency(Action<? super DependencyResolveDetails> rule) {
    dependencyResolveRules.add(rule);
    return this;
}
项目:Reer    文件:DependencySubstitutionsInternal.java   
DependencySubstitutions allWithDependencyResolveDetails(Action<? super DependencyResolveDetails> rule);