Java Code Examples for org.gradle.api.internal.tasks.TaskDependencyResolveContext#add()

The following examples show how to use org.gradle.api.internal.tasks.TaskDependencyResolveContext#add() . 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: CompositeFileCollection.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/**
 * Allows subclasses to add additional dependencies
 * @param context The context to add dependencies to.
 */
protected void addDependencies(TaskDependencyResolveContext context) {
    BuildDependenciesOnlyFileCollectionResolveContext fileContext = new BuildDependenciesOnlyFileCollectionResolveContext();
    resolve(fileContext);
    for (Buildable buildable : fileContext.resolveAsBuildables()) {
        context.add(buildable);
    }
}
 
Example 2
Source File: TasksFromProjectDependencies.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
void resolveProjectDependencies(TaskDependencyResolveContext context, Set<ProjectDependency> projectDependencies) {
    for (ProjectDependency projectDependency : projectDependencies) {
        //in configure-on-demand we don't know if the project was configured, hence explicit evaluate.
        // Not especially tidy, we should clean this up while working on new configuration model.
        ((ProjectInternal) projectDependency.getDependencyProject()).evaluate();

        Task nextTask = projectDependency.getDependencyProject().getTasks().findByName(taskName);
        if (nextTask != null) {
            context.add(nextTask);
        }
    }
}
 
Example 3
Source File: DefaultProjectDependency.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    if (!buildProjectDependencies) {
        return;
    }
    projectAccessListener.beforeResolvingProjectDependency(dependencyProject);

    Configuration configuration = getProjectConfiguration();
    context.add(configuration);
    context.add(configuration.getAllArtifacts());
}
 
Example 4
Source File: DefaultProjectDependency.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    if (!buildProjectDependencies) {
        return;
    }
    projectAccessListener.beforeResolvingProjectDependency(dependencyProject);

    Configuration configuration = getProjectConfiguration();
    context.add(configuration);
    context.add(configuration.getAllArtifacts());
}
 
Example 5
Source File: DefaultProjectDependency.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    if (!buildProjectDependencies) {
        return;
    }
    projectAccessListener.beforeResolvingProjectDependency(dependencyProject);

    Configuration configuration = getProjectConfiguration();
    context.add(configuration);
    context.add(configuration.getAllArtifacts());
}
 
Example 6
Source File: CompositeFileCollection.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/**
 * Allows subclasses to add additional dependencies
 * @param context The context to add dependencies to.
 */
protected void addDependencies(TaskDependencyResolveContext context) {
    BuildDependenciesOnlyFileCollectionResolveContext fileContext = new BuildDependenciesOnlyFileCollectionResolveContext();
    resolve(fileContext);
    for (Buildable buildable : fileContext.resolveAsBuildables()) {
        context.add(buildable);
    }
}
 
Example 7
Source File: CompositeFileCollection.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/**
 * Allows subclasses to add additional dependencies
 * @param context The context to add dependencies to.
 */
protected void addDependencies(TaskDependencyResolveContext context) {
    BuildDependenciesOnlyFileCollectionResolveContext fileContext = new BuildDependenciesOnlyFileCollectionResolveContext();
    resolve(fileContext);
    for (Buildable buildable : fileContext.resolveAsBuildables()) {
        context.add(buildable);
    }
}
 
Example 8
Source File: CompositeFileCollection.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
/**
 * Allows subclasses to add additional dependencies
 * @param context The context to add dependencies to.
 */
protected void addDependencies(TaskDependencyResolveContext context) {
    BuildDependenciesOnlyFileCollectionResolveContext fileContext = new BuildDependenciesOnlyFileCollectionResolveContext();
    resolve(fileContext);
    for (Buildable buildable : fileContext.resolveAsBuildables()) {
        context.add(buildable);
    }
}
 
Example 9
Source File: DefaultDependencySet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (SelfResolvingDependency dependency : DefaultDependencySet.this.withType(SelfResolvingDependency.class)) {
        context.add(dependency);
    }
}
 
Example 10
Source File: DefaultPublishArtifactSet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (PublishArtifact publishArtifact : DefaultPublishArtifactSet.this) {
        context.add(publishArtifact);
    }
}
 
Example 11
Source File: DefaultMavenArtifactSet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (MavenArtifact mavenArtifact : DefaultMavenArtifactSet.this) {
        context.add(mavenArtifact);
    }
}
 
Example 12
Source File: DefaultIvyArtifactSet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (IvyArtifact ivyArtifact : DefaultIvyArtifactSet.this) {
        context.add(ivyArtifact);
    }
}
 
Example 13
Source File: DefaultPublishArtifactSet.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (PublishArtifact publishArtifact : DefaultPublishArtifactSet.this) {
        context.add(publishArtifact);
    }
}
 
Example 14
Source File: PlayApplicationPlugin.java    From playframework with Apache License 2.0 4 votes vote down vote up
@Override
public void visitDependencies(TaskDependencyResolveContext context) {
    context.add(configuration);
}
 
Example 15
Source File: DefaultPublishArtifactSet.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (PublishArtifact publishArtifact : DefaultPublishArtifactSet.this) {
        context.add(publishArtifact);
    }
}
 
Example 16
Source File: DefaultDependencySet.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (SelfResolvingDependency dependency : DefaultDependencySet.this.withType(SelfResolvingDependency.class)) {
        context.add(dependency);
    }
}
 
Example 17
Source File: DefaultIvyArtifactSet.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (IvyArtifact ivyArtifact : DefaultIvyArtifactSet.this) {
        context.add(ivyArtifact);
    }
}
 
Example 18
Source File: DefaultMavenArtifactSet.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (MavenArtifact mavenArtifact : DefaultMavenArtifactSet.this) {
        context.add(mavenArtifact);
    }
}
 
Example 19
Source File: DefaultPublishArtifactSet.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (PublishArtifact publishArtifact : DefaultPublishArtifactSet.this) {
        context.add(publishArtifact);
    }
}
 
Example 20
Source File: DefaultDependencySet.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void resolve(TaskDependencyResolveContext context) {
    for (SelfResolvingDependency dependency : DefaultDependencySet.this.withType(SelfResolvingDependency.class)) {
        context.add(dependency);
    }
}