-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
52 lines (44 loc) · 1.5 KB
/
build.gradle.kts
File metadata and controls
52 lines (44 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
application
kotlin("jvm") version "1.4.31"
id("com.github.johnrengelman.shadow") version "6.1.0"
}
group = "ladysnake"
version = "2.1.0"
// https://stackoverflow.com/questions/63997525/task-run-causes-org-joor-reflectexception-java-lang-nosuchfieldexception-ja
val currentOS = DefaultNativePlatform.getCurrentOperatingSystem()
val platform = when {
currentOS.isWindows() -> "win"
currentOS.isLinux() -> "linux"
currentOS.isMacOsX() -> "mac"
else -> throw IllegalStateException()
}
repositories {
mavenCentral()
}
dependencies {
testImplementation("junit", "junit", "4.12")
implementation("org.openjfx:javafx-base:15.0.1:${platform}")
implementation("org.openjfx:javafx-controls:15.0.1:${platform}")
implementation("org.openjfx:javafx-graphics:15.0.1:${platform}")
implementation("org.openjfx:javafx-fxml:15.0.1:${platform}")
implementation("no.tornado:tornadofx:1.7.20")
}
application {
mainModule.set("ladysnake.translationhelper.app")
mainClass.set("ladysnake.translationhelper.TranslationHelperKt")
// Shadow still uses the old attribute
mainClassName = mainClass.get()
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
useIR = true
}
}