Replace kotlinBaseVer with a new kotlinSplitVersion variable

This commit is contained in:
Username404 2021-11-07 12:07:36 +01:00
parent 81809efefb
commit 4793b033ff
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ val groupAndName = "${rootProject.group}.${rootProject.name.toLowerCase()}"
val javaVer: String = "8" val javaVer: String = "8"
val kotlinVer: String by rootProject val kotlinVer: String by rootProject
val kotlinBaseVer = kotlinVer.substring(0..2) val kotlinSplitVersion = kotlinVer.split('.')
val serializationVer: String by rootProject val serializationVer: String by rootProject
val mcBase: String = (rootProject.property("minecraft") as String).also { val mcBase: String = (rootProject.property("minecraft") as String).also {
architectury { minecraft = it } architectury { minecraft = it }
@ -207,8 +207,8 @@ allprojects {
"-Xopt-in=kotlin.RequiresOptIn", "-Xextended-compiler-checks", "-Xassertions=jvm", "-progressive" "-Xopt-in=kotlin.RequiresOptIn", "-Xextended-compiler-checks", "-Xassertions=jvm", "-progressive"
) )
jvmTarget = if (javaVer.toInt() < 9) "1.$javaVer" else javaVer jvmTarget = if (javaVer.toInt() < 9) "1.$javaVer" else javaVer
languageVersion = (kotlinBaseVer.toDouble() + 0.1).toString() languageVersion = (kotlinSplitVersion[0] + '.' + (kotlinSplitVersion[1].toShort() + 1).toString())
apiVersion = kotlinBaseVer apiVersion = "${kotlinSplitVersion[0]}.${kotlinSplitVersion[1]}"
} }
} }
withType(JavaCompile::class) { withType(JavaCompile::class) {