Skip to content

Commit ad9ab5c

Browse files
committed
fix versions with invalid chars
1 parent 9a61ad6 commit ad9ab5c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

settings.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ val gitVersion: Provider<String> =
8989

9090
if (!detached) {
9191
"$branch-SNAPSHOT"
92+
// control chars and slashes aren't allowed in Maven Versions
93+
.map { c -> if (c.isISOControl() || c == '/' || c == '\\') "_" else c }
94+
.joinToString("")
9295
} else {
9396
val descriptions = described.split("-")
9497
val head = descriptions.singleOrNull() ?: ""

0 commit comments

Comments
 (0)