UI improvements, CLI fallbacks
This commit is contained in:
@@ -8,7 +8,22 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.jaytux.phoebench"
|
||||
version = rootProject.version.toString()
|
||||
version = "1.0.1"
|
||||
|
||||
val versionDirectory = layout.buildDirectory.dir("generated/sources/version")
|
||||
val generateVersion = tasks.register<Task>("serverVersion") {
|
||||
doFirst {
|
||||
val outFile = versionDirectory.get().file("com/jaytux/phoebench/client/cli/Version.kt").asFile
|
||||
outFile.parentFile.mkdirs()
|
||||
outFile.writeText("""
|
||||
package com.jaytux.phoebench.client.cli
|
||||
|
||||
object CliVersion {
|
||||
const val VERSION="${rootProject.version}"
|
||||
}
|
||||
""".trimIndent())
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib"))
|
||||
@@ -42,6 +57,18 @@ kotlin {
|
||||
freeCompilerArgs.add("-Xcontext-parameters")
|
||||
optIn.add("kotlin.uuid.ExperimentalUuidApi")
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
val main by getting {
|
||||
kotlin {
|
||||
srcDir(versionDirectory)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.compileKotlin {
|
||||
dependsOn(generateVersion)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<ShadowJar> {
|
||||
|
||||
Reference in New Issue
Block a user