Skip to content

Commit

Permalink
Merge pull request #242 from grails/remove-plain-archive-classifier
Browse files Browse the repository at this point in the history
Remove "plain" archive classifier, unless bootJar or bootWar are enabled
  • Loading branch information
puneetbehl authored Oct 25, 2023
2 parents 651ee65 + 9d88927 commit 7c1605f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import org.gradle.api.plugins.PluginManager
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.bundling.Jar
import org.gradle.plugins.signing.Sign
import org.gradle.plugins.signing.SigningExtension
import org.gradle.plugins.signing.SigningPlugin
Expand Down Expand Up @@ -117,6 +118,11 @@ BINTRAY_KEY=key
final PluginManager pluginManager = project.getPluginManager()
pluginManager.apply(MavenPublishPlugin.class)

// Remove "plain" archive classifier, unless bootJar or bootWar are enabled
if (!taskContainer.findByName("bootJar")?.enabled && !taskContainer.findByName("bootWar")?.enabled) {
(taskContainer.findByName("jar") as Jar).archiveClassifier.set("")
}

project.publishing {
if (isSnapshot) {
repositories {
Expand Down

0 comments on commit 7c1605f

Please sign in to comment.