Skip to content

Commit 01f02ca

Browse files
authored
fix version.gradle.kts logic (#1256)
*Issue #, if available:* *Description of changes:* cherry-picks commit from #1255, see for more details. Do not touch the version variable in environments where `-Prelease.version` is passed in. This prevents a versioning conflict in `closeAndReleaseSonatypeStagingRepository`, an error which was only thrown when releasing. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent c776ce7 commit 01f02ca

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

version.gradle.kts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
val adotVersion = "2.20.0-SNAPSHOT"
1717

1818
allprojects {
19-
version = if (project.hasProperty("release.version")) {
20-
project.property("release.version") as String
21-
} else {
22-
adotVersion
19+
if (!project.hasProperty("release.version")) {
20+
version = adotVersion
2321
}
2422
}

0 commit comments

Comments
 (0)