waituntil/build.gradle.kts

47 lines
1.1 KiB
Text
Raw Normal View History

plugins {
// Apply the application plugin to add support for building a CLI application in Java.
application
// For generating fat jars
id("com.github.johnrengelman.shadow") version "latest.release"
}
fun versionBanner(): String {
val os = org.apache.commons.io.output.ByteArrayOutputStream()
project.exec {
commandLine = "git describe --always --dirty".split(" ")
standardOutput = os
}
return String(os.toByteArray()).trim()
}
group = "de.jotoho"
version = versionBanner()
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
java {
2021-12-01 12:30:21 +01:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.jar {
manifest {
attributes(
2022-01-02 18:32:46 +01:00
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Main-Class" to "de.jotoho.waituntil.Main",
"Main-Module" to "de.jotoho.waituntil.main"
)
}
}
application {
// Define the main class for the application.
2021-12-01 14:36:07 +01:00
mainClass.set("de.jotoho.waituntil.Main")
2022-01-02 18:32:46 +01:00
mainModule.set("de.jotoho.waituntil.main")
}