Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit c5e0e68

Browse files
committed
build: remove duplicate abi classifier in version names
1 parent ab301dd commit c5e0e68

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

build-logic/ide/src/main/java/ProjectConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ val Project.simpleVersionName: String
4949
get() {
5050

5151
val version = rootProject.version.toString()
52-
val regex = Regex("^v\\d+\\.?\\d+\\.?\\d+(-\\w+)*")
52+
val regex = Regex("^v\\d+\\.?\\d+\\.?\\d+-\\w+")
5353

5454
val simpleVersion = regex.find(version)?.value?.substring(1)?.also {
5555
if (shouldPrintVersionName) {

settings.gradle.kts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ buildscript {
2323
FDroidConfig.load(rootDir)
2424

2525
if (FDroidConfig.hasRead && FDroidConfig.isFDroidBuild) {
26-
gradle.rootProject { project.setProperty("version", FDroidConfig.fDroidVersionName!!) }
26+
gradle.rootProject {
27+
val regex = Regex("^v\\d+\\.?\\d+\\.?\\d+-\\w+")
28+
29+
val simpleVersion = regex.find(FDroidConfig.fDroidVersionName!!)?.value
30+
?: throw IllegalArgumentException("Invalid version '${FDroidConfig.fDroidVersionName}. Version name must have semantic version format.'")
31+
32+
project.setProperty("version", simpleVersion)
33+
}
2734
} else {
2835
apply {
2936
plugin("com.mooltiverse.oss.nyx")

0 commit comments

Comments
 (0)