use of org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact in project gradle by gradle.
the class EclipsePlugin method createArtifact.
private static LocalComponentArtifactMetadata createArtifact(String extension, ProjectComponentIdentifier projectId, String projectName, Project project) {
File projectFile = new File(project.getProjectDir(), "." + extension);
Task byName = project.getTasks().getByName("eclipseProject");
String type = "eclipse." + extension;
PublishArtifact publishArtifact = new DefaultPublishArtifact(projectName, extension, type, null, null, projectFile, byName);
return new PublishArtifactLocalArtifactMetadata(projectId, publishArtifact);
}
use of org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact in project gradle by gradle.
the class IdeaPlugin method createImlArtifact.
private static LocalComponentArtifactMetadata createImlArtifact(ProjectComponentIdentifier projectId, Project project) {
String moduleName = project.getExtensions().getByType(IdeaModel.class).getModule().getName();
File imlFile = new File(project.getProjectDir(), moduleName + ".iml");
Task byName = project.getTasks().getByName("ideaModule");
PublishArtifact publishArtifact = new DefaultPublishArtifact(moduleName, "iml", "iml", null, null, imlFile, byName);
return new PublishArtifactLocalArtifactMetadata(projectId, publishArtifact);
}
use of org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact in project gradle by gradle.
the class JvmLocalLibraryMetaDataAdapter method addArtifact.
private static void addArtifact(UsageKind usage, Set<File> directories, EnumMap<UsageKind, List<PublishArtifact>> artifacts, JvmAssembly assembly) {
List<PublishArtifact> publishArtifacts = artifacts.get(usage);
for (File dir : directories) {
DefaultPublishArtifact publishArtifact = new DefaultPublishArtifact("assembly", "", "", "", new Date(dir.lastModified()), dir);
publishArtifact.builtBy(assembly);
publishArtifacts.add(publishArtifact);
}
}
Aggregations