use of org.gradle.api.artifacts.Configuration in project gradle by gradle.
the class DefaultConfiguration method runDependencyActions.
public void runDependencyActions() {
defaultDependencyActions.execute(dependencies);
withDependencyActions.execute(dependencies);
// Discard actions after execution
defaultDependencyActions = ImmutableActionSet.empty();
withDependencyActions = ImmutableActionSet.empty();
for (Configuration superConfig : extendsFrom) {
((ConfigurationInternal) superConfig).runDependencyActions();
}
}
use of org.gradle.api.artifacts.Configuration in project gradle by gradle.
the class DefaultDependencyHandler method doAdd.
private Dependency doAdd(Configuration configuration, Object dependencyNotation, Closure configureClosure) {
if (dependencyNotation instanceof Configuration) {
Configuration other = (Configuration) dependencyNotation;
if (!configurationContainer.contains(other)) {
throw new UnsupportedOperationException("Currently you can only declare dependencies on configurations from the same project.");
}
configuration.extendsFrom(other);
return null;
}
Dependency dependency = create(dependencyNotation, configureClosure);
configuration.getDependencies().add(dependency);
return dependency;
}
use of org.gradle.api.artifacts.Configuration in project gradle by gradle.
the class ProjectOutcomesModelBuilder method addArtifacts.
private void addArtifacts(Project project, List<GradleFileBuildOutcome> outcomes) {
Configuration configuration = project.getConfigurations().findByName(Dependency.ARCHIVES_CONFIGURATION);
if (configuration != null) {
for (PublishArtifact artifact : configuration.getArtifacts()) {
GradleFileBuildOutcome outcome = artifactTransformer.transform(artifact, project);
outcomes.add(outcome);
}
}
}
use of org.gradle.api.artifacts.Configuration in project gradle by gradle.
the class IdeaDependenciesProvider method visitDependencies.
private IdeaDependenciesVisitor visitDependencies(IdeaModule ideaModule, GeneratedIdeaScope scope) {
DependencyHandler handler = ideaModule.getProject().getDependencies();
Collection<Configuration> plusConfigurations = getPlusConfigurations(ideaModule, scope);
Collection<Configuration> minusConfigurations = getMinusConfigurations(ideaModule, scope);
IdeaDependenciesVisitor visitor = new IdeaDependenciesVisitor(ideaModule, scope.name());
new IdeDependencySet(handler, plusConfigurations, minusConfigurations).visit(visitor);
return visitor;
}
use of org.gradle.api.artifacts.Configuration in project gradle by gradle.
the class JacocoPlugin method addJacocoConfigurations.
/**
* Creates the configurations used by plugin.
*/
private void addJacocoConfigurations() {
Configuration agentConf = project.getConfigurations().create(AGENT_CONFIGURATION_NAME);
agentConf.setVisible(false);
agentConf.setTransitive(true);
agentConf.setDescription("The Jacoco agent to use to get coverage data.");
Configuration antConf = project.getConfigurations().create(ANT_CONFIGURATION_NAME);
antConf.setVisible(false);
antConf.setTransitive(true);
antConf.setDescription("The Jacoco ant tasks to use to get execute Gradle tasks.");
}
Aggregations