-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
129 lines (107 loc) · 4.08 KB
/
build.gradle.kts
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "org.ksoftware"
version = "1.0-SNAPSHOT"
plugins {
application
java
kotlin("jvm") version "1.6.0"
id("com.google.devtools.ksp") version "1.6.0-1.0.1"
id("org.openjfx.javafxplugin") version "0.0.9"
id ("org.beryx.runtime") version "1.12.2"
}
application {
mainClass.set("org.ksoftware.lorebook.main.MainInvokerKt")
applicationDefaultJvmArgs = listOf(
"--add-opens=javafx.graphics/javafx.css=ALL-UNNAMED",
"--add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED",
"--add-opens=javafx.base/com.sun.javafx.runtime=ALL-UNNAMED",
"--add-opens=javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED",
"--add-opens=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED",
"--add-opens=javafx.base/com.sun.javafx.binding=ALL-UNNAMED",
"--add-opens=javafx.base/com.sun.javafx.event=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.util=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.glass.ui=ALL-UNNAMED",
"--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED",
"--add-opens=javafx.base/java.lang.reflect=ALL-UNNAMED"
)
}
kotlin {
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "16"
languageVersion = "1.6"
}
}
}
javafx {
version = "17"
modules = mutableListOf(
"javafx.controls",
"javafx.graphics",
"javafx.fxml",
"javafx.swing")
}
runtime {
addOptions("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages")
modules.set(listOf("java.desktop", "jdk.unsupported", "java.scripting", "java.logging", "java.xml"))
}
tasks["runtime"].doLast {
copy {
from("src/main/resources")
into("$buildDir/image/bin")
}
}
ksp {
// arg("moshi.generated", "javax.annotation.Generated")
}
repositories {
google()
mavenCentral()
mavenLocal {
url = uri("C://Users/samke/.m2/repository")
}
maven("https://oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
implementation(fileTree("libs"))
implementation("net.ksoftware.kdockfx:kdockfx:1.0")
implementation("no.tornado:tornadofx2:2.0.0-SNAPSHOT")
implementation ("io.github.palexdev:materialfx:11.12.0")
implementation("org.burningwave:core:12.35.0")
//image manipulation
implementation("com.sksamuel.scrimage:scrimage-core:4.0.24")
// logging
implementation("org.slf4j:slf4j-simple:2.0.0-alpha5")
implementation("io.github.microutils:kotlin-logging:2.1.0")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.30")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-javafx:1.5.2")
// fancy javafx controls
implementation("com.jfoenix:jfoenix:9.0.10")
implementation("org.controlsfx:controlsfx:11.1.0")
// richtext
implementation("org.fxmisc.richtext:richtextfx:0.10.7")
implementation("org.fxmisc.flowless:flowless:0.6.7")
implementation("org.fxmisc.wellbehaved:wellbehavedfx:0.3.3")
// material design theme
implementation("org.jfxtras:jmetro:11.6.15")
// For copy + paste of rich text
implementation("jakarta.xml.bind:jakarta.xml.bind-api:3.0.1")
implementation("com.sun.xml.bind:jaxb-impl:3.0.1")
implementation("io.github.micheljung:fxstage:0.8.0")
// For JSON serialisation
implementation("com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.6.0-1.0.1")
implementation("com.squareup.moshi:moshi:1.12.0")
ksp("dev.zacsweers.moshix:moshi-ksp:0.14.1")
implementation(kotlin("stdlib-jdk8"))
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "16"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "16"
}