use of org.gradle.platform.base.internal.DefaultComponentSpecIdentifier in project gradle by gradle.
the class VisualStudioSolutionRegistry method addSolution.
public void addSolution(DefaultVisualStudioProject visualStudioProject) {
for (DefaultVisualStudioSolution solution : this) {
if (solution.getRootProject() == visualStudioProject) {
return;
}
}
DefaultVisualStudioSolution solution = getInstantiator().newInstance(DefaultVisualStudioSolution.class, new DefaultComponentSpecIdentifier(projectIdentifier.getPath(), visualStudioProject.getName()), visualStudioProject, fileResolver, projectResolver, getInstantiator());
add(solution);
}
use of org.gradle.platform.base.internal.DefaultComponentSpecIdentifier in project gradle by gradle.
the class JavaBasePlugin method configureSourceSetDefaults.
private BridgedBinaries configureSourceSetDefaults(final JavaPluginConvention pluginConvention) {
final Project project = pluginConvention.getProject();
final List<ClassDirectoryBinarySpecInternal> binaries = Lists.newArrayList();
pluginConvention.getSourceSets().all(new Action<SourceSet>() {
public void execute(final SourceSet sourceSet) {
ConventionMapping outputConventionMapping = ((IConventionAware) sourceSet.getOutput()).getConventionMapping();
ConfigurationContainer configurations = project.getConfigurations();
defineConfigurationsForSourceSet(sourceSet, configurations);
definePathsForSourceSet(sourceSet, outputConventionMapping, project);
createProcessResourcesTaskForBinary(sourceSet, sourceSet.getResources(), project);
createCompileJavaTaskForBinary(sourceSet, sourceSet.getJava(), project);
createBinaryLifecycleTask(sourceSet, project);
DefaultComponentSpecIdentifier binaryId = new DefaultComponentSpecIdentifier(project.getPath(), sourceSet.getName());
ClassDirectoryBinarySpecInternal binary = instantiator.newInstance(DefaultClassDirectoryBinarySpec.class, binaryId, sourceSet, javaToolChain, DefaultJavaPlatform.current(), instantiator, taskFactory);
Classpath compileClasspath = new SourceSetCompileClasspath(sourceSet);
DefaultJavaSourceSet javaSourceSet = instantiator.newInstance(DefaultJavaSourceSet.class, binaryId.child("java"), sourceSet.getJava(), compileClasspath);
JvmResourceSet resourceSet = instantiator.newInstance(DefaultJvmResourceSet.class, binaryId.child("resources"), sourceSet.getResources());
binary.addSourceSet(javaSourceSet);
binary.addSourceSet(resourceSet);
attachTasksToBinary(binary, sourceSet, project);
binaries.add(binary);
}
});
return new BridgedBinaries(binaries);
}
Aggregations