Skip to content

Commit

Permalink
Revert "Gradle custom java zippublish plugin (#2988)"
Browse files Browse the repository at this point in the history
This reverts commit d61aa40.
  • Loading branch information
dblock authored Apr 27, 2022
1 parent d61aa40 commit b67594b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 192 deletions.
23 changes: 10 additions & 13 deletions buildSrc/src/main/java/org/opensearch/gradle/PublishPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,18 @@ public String call() throws Exception {
// Add git origin info to generated POM files
publication.getPom().withXml(PublishPlugin::addScmInfo);

if (!publication.getName().toLowerCase().contains("zip")) {
// have to defer this until archivesBaseName is set
project.afterEvaluate(p -> publication.setArtifactId(getArchivesBaseName(project)));

// have to defer this until archivesBaseName is set
project.afterEvaluate(p -> publication.setArtifactId(getArchivesBaseName(project)));

// publish sources and javadoc for Java projects.
if (project.getPluginManager().hasPlugin("opensearch.java")) {
publication.artifact(project.getTasks().getByName("sourcesJar"));
publication.artifact(project.getTasks().getByName("javadocJar"));
}

generatePomTask.configure(
t -> t.dependsOn(String.format("generatePomFileFor%sPublication", Util.capitalize(publication.getName())))
);
// publish sources and javadoc for Java projects.
if (project.getPluginManager().hasPlugin("opensearch.java")) {
publication.artifact(project.getTasks().getByName("sourcesJar"));
publication.artifact(project.getTasks().getByName("javadocJar"));
}

generatePomTask.configure(
t -> t.dependsOn(String.format("generatePomFileFor%sPublication", Util.capitalize(publication.getName())))
);
});

}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit b67594b

Please sign in to comment.