plugins {
id("java")
kotlin("jvm") version "1.5.10"
kotlin("plugin.serialization") version "1.5.10"
id("com.github.johnrengelman.shadow") version "5.2.0"
id("application")
id("org.openjfx.javafxplugin") version "0.0.9"
}
group = "ru.nic"
version = "1"
repositories {
jcenter()
mavenCentral()
}
sourceSets.main {
java.srcDirs(
"src/main/kotlin/",
"../common/",
"../common/utils/",
"../common/model/",
)
resources.srcDirs(
"src/main/resources/",
"../common/resources/"
)
}
application {
mainClassName = "ru.nic.baseH2.MainViewKt"
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("no.tornado:tornadofx:1.7.19")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1")
implementation("org.jetbrains.exposed:exposed-core:0.34.1")
implementation("org.jetbrains.exposed:exposed-dao:0.34.1")
implementation("org.jetbrains.exposed:exposed-jdbc:0.34.1")
implementation("com.h2database:h2:1.4.200")
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.1")
implementation("commons-codec:commons-codec:1.10")
implementation("io.ktor:ktor-client-core:1.6.4")
implementation("io.ktor:ktor-client-cio:1.6.4")
implementation(fileTree("../libs"))
testImplementation(kotlin("test"))
}
javafx {
version = "15"
modules = listOf("javafx.base","javafx.controls","javafx.fxml","javafx.graphics","javafx.media","javafx.swing","javafx.web")
}
application {
mainClassName = "ru.nic.baseH2.MainViewKt"
}
tasks {
val renameAndCopy = register("renameAndCopy", Copy::class) {
from("$buildDir/libs") {
rename("BaseH2-1-all.jar", "BaseH2.jar")
}
includeEmptyDirs = false
include("BaseH2.jar","BaseH2-1-all.jar")
into("../")
}
shadowJar {
println("$buildDir/libs")
manifest {
attributes["mainClassName"] = "ru.nic.baseH2.MainViewKt"
}
finalizedBy(renameAndCopy)
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.useIR = true
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
test {
useJUnitPlatform()
}
}