2020-11-10 00:42:41 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
kotlin("jvm")
|
|
|
|
application
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "net.codinux.banking.epcqrcode.javafx"
|
|
|
|
|
2020-11-12 21:59:33 +00:00
|
|
|
val mainClassName = "net.codinux.banking.epcqrcode.EpcQrCodeJavaFxAppKt"
|
|
|
|
|
2020-11-10 00:42:41 +00:00
|
|
|
|
2020-11-13 02:05:45 +00:00
|
|
|
val compileKotlin: KotlinCompile by tasks
|
|
|
|
compileKotlin.kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
val compileTestKotlin: KotlinCompile by tasks
|
|
|
|
compileTestKotlin.kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
2020-11-12 21:59:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
2020-11-10 00:42:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType<KotlinCompile>() {
|
|
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
|
2020-11-13 02:05:45 +00:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("stdlib-jdk8"))
|
|
|
|
|
2020-11-15 23:15:16 +00:00
|
|
|
api(project(":EpcQrCode"))
|
2020-11-13 02:05:45 +00:00
|
|
|
|
|
|
|
implementation("net.dankito.utils:java-fx-utils:1.0.8")
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-10 00:42:41 +00:00
|
|
|
application {
|
2020-11-12 21:59:33 +00:00
|
|
|
mainClassName = mainClassName
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tasks.withType<Jar> {
|
|
|
|
isZip64 = true
|
|
|
|
|
|
|
|
// If one of the source JARs is signed, merging it into one fat jar destroys the signature -> remove signatures
|
|
|
|
// (but may runs into problems with jars that require a valid signature like BouncyCastle, see
|
|
|
|
// https://stackoverflow.com/questions/51455197/gradle-fatjar-could-not-find-or-load-main-class)
|
|
|
|
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
|
|
|
|
|
|
|
|
manifest {
|
|
|
|
attributes(mapOf(
|
|
|
|
"Main-Class" to mainClassName,
|
|
|
|
"Implementation-Title" to "EPC QR Code",
|
|
|
|
"Implementation-Version" to "1.0.0-SNAPSHOT"
|
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
|
|
|
|
|
|
// To add all of the dependencies
|
|
|
|
from(sourceSets.main.get().output)
|
|
|
|
|
|
|
|
dependsOn(configurations.runtimeClasspath)
|
|
|
|
from({
|
|
|
|
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
|
|
|
|
})
|
2020-11-10 00:42:41 +00:00
|
|
|
}
|