-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
92 lines (80 loc) · 2.7 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
92 lines (80 loc) · 2.7 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
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
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
kotlin("jvm")
kotlin("plugin.serialization")
java
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.compose")
}
group = "com.game"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://jitpack.io")
maven("https://packages.jetbrains.team/maven/p/kpm/public")
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
}
dependencies {
// Note, if you develop a library, you should use compose.desktop.common.
// compose.desktop.currentOs should be used in launcher-sourceSet
// (in a separate module for demo project and in testMain).
// With compose.desktop.common you will also lose @Preview functionality
implementation(compose.desktop.currentOs) {
exclude(group = compose.material)
}
implementation(libs.kotlinx.serilization)
implementation(libs.okhttp3)
implementation(libs.nicehttp)
implementation(libs.net.jna)
implementation(libs.jewel.int)
implementation(libs.jewel)
implementation(libs.java.seleniumhq)
implementation(libs.kotlinx.coroutines.swing)
implementation(libs.jsoup)
implementation(libs.google.gson)
implementation(libs.xerial.sqlite)
implementation("io.github.m0ssi-p:auraplayer-compose:0.1.4")
implementation("org.jetbrains.kotlin:kotlin-reflect:1.9.0")
implementation("org.commonmark:commonmark:0.21.0")
}
val jdkLevel = "21"
kotlin {
jvmToolchain {
languageVersion = JavaLanguageVersion.of(jdkLevel)
}
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "game"
packageVersion = "1.0.1"
includeAllModules = true
val os = org.gradle.internal.os.OperatingSystem.current()
javaHome = when {
os.isWindows -> "C:/jbr/win/jbrsdk-21.0.8"
os.isMacOsX -> "C:/jbr/mac/jbrsdk-21.0.8/Contents/Home"
os.isLinux -> "C:/jbr/lin/jbrsdk-21.0.8"
else -> throw GradleException("Unsupported OS")
}
windows {
iconFile.set(
project.file("src/main/resources/src/logo.ico")
)
}
}
}
}
tasks {
withType<JavaExec> {
afterEvaluate {
javaLauncher = project.javaToolchains.launcherFor { languageVersion = JavaLanguageVersion.of(jdkLevel) }
setExecutable(javaLauncher.map { it.executablePath.asFile.absolutePath }.get())
}
}
jar {
archiveFileName.set("The_Guide.jar")
}
}