Use string templates

This commit is contained in:
JeremyStar™ 2024-12-13 02:59:35 +01:00
parent 083bd022bc
commit c78cb4eb75
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -58,11 +58,11 @@ allprojects {
apply(plugin = "com.gorylenko.gradle-git-properties")
// Version
version = property("versionRelease") as String + "-" + property("versionType") as String + property("versionTyperelease") as String
version = "${property("versionRelease") as String}-${property("versionType") as String}${property("versionTyperelease") as String}"
if (property("versionFork") != "")
version = version as String + "-" + property("versionFork") as String
version = "${version as String}-${property("versionFork") as String}"
if (property("versionCompanion") != "")
version = version as String + "+" + property("versionCompanion") as String
version = "${version as String}+${property("versionCompanion") as String}"
// Repositories
repositories {
@ -79,16 +79,16 @@ allprojects {
kotlin.sourceSets.main {
dependencies {
implementation(property("dependencyKotlinReflectIdentifier") as String + ":" + property("dependencyKotlinReflectVersion") as String)
implementation(property("dependencyKotlinDateTimeIdentifier") as String + ":" + property("dependencyKotlinDateTimeVersion") as String)
implementation("${property("dependencyKotlinReflectIdentifier") as String}:${property("dependencyKotlinReflectVersion") as String}")
implementation("${property("dependencyKotlinDateTimeIdentifier") as String}:${property("dependencyKotlinDateTimeVersion") as String}")
}
}
// Java
java {
// Java version
sourceCompatibility = JavaVersion.valueOf("VERSION_" + property("java") as String)
targetCompatibility = JavaVersion.valueOf("VERSION_" + property("java") as String)
sourceCompatibility = JavaVersion.valueOf("VERSION_${property("java") as String}")
targetCompatibility = JavaVersion.valueOf("VERSION_${property("java") as String}")
toolchain {
languageVersion = JavaLanguageVersion.of(property("java") as String)