Skip to content

Commit 111a894

Browse files
committed
Update version config
1 parent bf2b0c0 commit 111a894

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

gradle-conventions-settings/src/main/kotlin/conventions-version-resolution.settings.gradle.kts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
2+
* Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
33
*/
44

55
import java.io.BufferedReader
@@ -178,12 +178,16 @@ fun VersionCatalogBuilder.resolveLibraryVersion(versionCatalog: Map<String, Stri
178178
?.let {
179179
when {
180180
it.isBlank() -> ""
181-
it == "SNAPSHOT" -> "-$it"
182-
else -> "-eap-$it"
181+
else -> "-$it"
183182
}
184183
} ?: ""
185184

186-
version(SettingsConventions.LIBRARY_CORE_VERSION_ALIAS, libraryCoreVersion + eapVersion)
185+
val resultingVersion = when (eapVersion) {
186+
"" -> libraryCoreVersion
187+
else -> libraryCoreVersion.substringBefore('-') + eapVersion
188+
}
189+
190+
version(SettingsConventions.LIBRARY_CORE_VERSION_ALIAS, resultingVersion)
187191
}
188192

189193
fun String.kotlinVersionParsed(): KotlinVersion {

0 commit comments

Comments
 (0)