This repository was archived by the owner on Oct 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
build-logic/ide/src/main/java Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff 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) {
Original file line number Diff line number Diff line change @@ -23,7 +23,14 @@ buildscript {
2323FDroidConfig .load(rootDir)
2424
2525if (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" )
You can’t perform that action at this time.
0 commit comments