File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ dependencies {
5555
5656tasks {
5757 build {
58+ dependsOn(shadowJar)
5859 dependsOn(" copyJar" )
5960 // Ensure standard jar is built for Maven publishing (stays in build/libs)
6061 dependsOn(jar)
@@ -74,21 +75,28 @@ tasks {
7475 attributes[" Plugin-Dependencies" ] = pluginDependencies
7576 }
7677
77- archiveFileName.set(" $pluginId -$version .jar" )
78+ if (version != " unspecified" ) {
79+ archiveFileName.set(" $pluginId -v${version} .jar" )
80+ } else {
81+ archiveFileName.set(" $pluginId .jar" )
82+ }
83+
84+ if (project.gradle.startParameter.taskNames.contains(" publish" )) {
85+ archiveFileName.set(archiveFileName.get().lowercase())
86+ }
7887
7988 dependencies {
8089 exclude(dependency(" io.vertx:vertx-core" ))
8190 exclude {
8291 it.moduleGroup == " io.netty" || it.moduleGroup == " org.slf4j"
8392 }
8493 }
85-
86- if (project.gradle.startParameter.taskNames.contains(" publish" )) {
87- archiveFileName.set(archiveFileName.get().lowercase())
88- }
8994 }
9095
9196 register(" copyJar" ) {
97+ outputs.upToDateWhen { false }
98+ mustRunAfter(shadowJar)
99+
92100 pluginsDir?.let {
93101 doLast {
94102 copy {
@@ -97,9 +105,6 @@ tasks {
97105 }
98106 }
99107 }
100-
101- outputs.upToDateWhen { false }
102- mustRunAfter(shadowJar)
103108 }
104109}
105110
You can’t perform that action at this time.
0 commit comments