Skip to content

Commit 2cd29a5

Browse files
committed
fix: fixed not releasing actual plugin
1 parent 5958051 commit 2cd29a5

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

build.gradle.kts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ dependencies {
6161

6262
tasks {
6363
build {
64+
dependsOn(shadowJar)
6465
dependsOn("copyJar")
6566
// Ensure standard jar is built for Maven publishing (stays in build/libs)
6667
dependsOn(jar)
@@ -80,21 +81,28 @@ tasks {
8081
attributes["Plugin-Dependencies"] = pluginDependencies
8182
}
8283

83-
archiveFileName.set("$pluginId-$version.jar")
84+
if (version != "unspecified") {
85+
archiveFileName.set("${rootProject.name}-v${version}.jar")
86+
} else {
87+
archiveFileName.set("${rootProject.name}.jar")
88+
}
89+
90+
if (project.gradle.startParameter.taskNames.contains("publish")) {
91+
archiveFileName.set(archiveFileName.get().lowercase())
92+
}
8493

8594
dependencies {
8695
exclude(dependency("io.vertx:vertx-core"))
8796
exclude {
8897
it.moduleGroup == "io.netty" || it.moduleGroup == "org.slf4j"
8998
}
9099
}
91-
92-
if (project.gradle.startParameter.taskNames.contains("publish")) {
93-
archiveFileName.set(archiveFileName.get().lowercase())
94-
}
95100
}
96101

97102
register("copyJar") {
103+
outputs.upToDateWhen { false }
104+
mustRunAfter(shadowJar)
105+
98106
pluginsDir?.let {
99107
doLast {
100108
copy {
@@ -103,9 +111,6 @@ tasks {
103111
}
104112
}
105113
}
106-
107-
outputs.upToDateWhen { false }
108-
mustRunAfter(shadowJar)
109114
}
110115
}
111116

0 commit comments

Comments
 (0)