File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ allprojects {
1818 return @let it.removePrefix(" v" )
1919 val lastTag = versionDetails().lastTag
2020 val tag =
21- if (lastTag.startsWith(" v" )) lastTag.removePrefix(" v" )
21+ if (lastTag.startsWith(" v" )) lastTag.removePrefix(" v" )
2222 else " 0.0.0"
2323 val lastNum = tag.split(" ." ).last().toInt() + 1
2424 " ${tag.split(" ." ).subList(0 , 2 ).joinToString(" ." )} .$lastNum -SNAPSHOT"
@@ -42,7 +42,9 @@ tasks.withType<PublishToMavenRepository> {
4242 doFirst {
4343 println (" Publishing ${publication.groupId} :${publication.artifactId} :${publication.version} to ${repository.url} " )
4444 }
45- finalizedBy(tasks.closeAndReleaseStagingRepository)
45+ if (! (version as String ).endsWith(" SNAPSHOT" )) {
46+ finalizedBy(tasks.closeAndReleaseStagingRepository)
47+ }
4648}
4749
4850allprojects {
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ signing {
123123}
124124
125125tasks.withType<Sign >().configureEach {
126- onlyIf { ! (project.version as String ).contains (" SNAPSHOT" ) }
126+ onlyIf { ! (project.version as String ).endsWith (" SNAPSHOT" ) }
127127}
128128
129129tasks.test {
You can’t perform that action at this time.
0 commit comments