Script monitoring
This commit is contained in:
@@ -5,10 +5,11 @@ plugins {
|
||||
application
|
||||
alias(libs.plugins.serialization)
|
||||
alias(libs.plugins.shadow)
|
||||
alias(libs.plugins.buildconfig)
|
||||
}
|
||||
|
||||
group = "com.jaytux.phoebench"
|
||||
version = PhoebenchVersion(1, 1, 1)
|
||||
version = rootProject.version as PhoebenchVersion
|
||||
|
||||
if((version as PhoebenchVersion) < (rootProject.version as PhoebenchVersion))
|
||||
throw GradleException("CLI Client version must be at least as high as protocol/common version")
|
||||
@@ -28,12 +29,15 @@ val generateVersion = tasks.register<Task>("serverVersion") {
|
||||
}
|
||||
}
|
||||
|
||||
val isDebug = envValue("PHOEBENCH_BUILD_RELEASE") == null
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib"))
|
||||
implementation(libs.clikt)
|
||||
implementation(libs.ktor.client.core)
|
||||
implementation(libs.ktor.client.auth)
|
||||
implementation(libs.ktor.client.content.negotiation)
|
||||
implementation(libs.ktor.client.websocket)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
implementation(libs.kotlinx.serialization)
|
||||
implementation(project(":common"))
|
||||
@@ -42,6 +46,7 @@ dependencies {
|
||||
implementation(libs.slf4j.simple)
|
||||
implementation(libs.java.keystore)
|
||||
implementation(libs.ktor.serialization.kotlinx.json)
|
||||
implementation(libs.process)
|
||||
}
|
||||
|
||||
application {
|
||||
@@ -75,5 +80,24 @@ kotlin {
|
||||
}
|
||||
|
||||
tasks.withType<ShadowJar> {
|
||||
archiveFileName = "phoebench-cli.jar"
|
||||
archiveFileName = if(isDebug) "phoebench-cli-debug.jar" else "phoebench-cli.jar"
|
||||
}
|
||||
|
||||
buildConfig {
|
||||
generateAtSync = false
|
||||
useKotlinOutput { internalVisibility = false }
|
||||
|
||||
println("Source sets: ${kotlin.sourceSets.toList().map { it.name }}")
|
||||
|
||||
className("PersistenceConstants")
|
||||
packageName("com.jaytux.phoebench.clients.cli")
|
||||
|
||||
if(isDebug) {
|
||||
println("Using debug CLI service")
|
||||
buildConfigField("SERVICE", "com.jaytux.phoebench.cli.debug")
|
||||
}
|
||||
else {
|
||||
println("Using release CLI service")
|
||||
buildConfigField("SERVICE", "com.jaytux.phoebench.cli")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user