-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
129 lines (108 loc) · 3.57 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.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.compose.compiler)
// https://conveyor.hydraulic.dev/14.0/configs/maven-gradle/#gradle
//id("dev.hydraulic.conveyor") version "1.9"
idea
}
val appName = "StopBonus"
val appPackage = "love.forte.bonus"
val appMenuGroup = "forteApp"
val appNameWithPackage = "$appPackage.$appName"
val appVersion = "1.0.13"
group = appPackage
version = appVersion
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
}
java {
toolchain {
this.languageVersion.set(JavaLanguageVersion.of(17))
}
}
kotlin {
jvmToolchain(17)
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}
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)
implementation(compose.ui)
implementation(compose.uiUtil)
implementation(compose.uiTooling)
// implementation(compose.material)
implementation(compose.material3)
implementation(libs.h2db)
runtimeOnly(libs.logback.classic)
implementation(libs.kotlinx.coroutine.core)
implementation(libs.hikariCP)
implementation(libs.bundles.exposed)
implementation(libs.koalaPlot.core)
}
// https://github.com/JetBrains/compose-multiplatform/blob/master/tutorials/Native_distributions_and_local_execution/README.md
compose.desktop {
nativeApplication {
}
application {
mainClass = "MainKt"
jvmArgs += listOf(
"-XX:ErrorFile=.logs/hs_err.log",
"-XX:-HeapDumpOnOutOfMemoryError",
"-XX:HeapDumpPath=.logs/dump.hprof",
)
args("--win-help-url", "https://github.com/ForteScarlet/StopBonus")
args("--win-shortcut-prompt")
nativeDistributions {
modules("java.sql", "java.naming")
targetFormats(
TargetFormat.Dmg, TargetFormat.Deb,
TargetFormat.Rpm, TargetFormat.Pkg,
TargetFormat.Msi, TargetFormat.Exe
)
packageName = appName
packageVersion = appVersion
vendor = "Forte Scarlet"
description = "DO NOT BONUS YOURSELF!"
copyright = "Copyright © 2024 Forte Scarlet. All rights reserved."
linux {
shortcut = true
menuGroup = appMenuGroup
iconFile.set(project.rootDir.resolve("icon.png"))
debMaintainer = "ForteScarlet@163.com"
}
macOS {
bundleID = appNameWithPackage
iconFile.set(project.rootDir.resolve("icon.icns"))
}
windows {
shortcut = true
dirChooser = true
menuGroup = appMenuGroup
perUserInstall = true
menu = true
iconFile.set(project.rootDir.resolve("icon.ico"))
upgradeUuid = "f4a9a22b-b663-4848-95a8-7c0cf844da3f"
}
}
buildTypes.release.proguard {
isEnabled.set(false)
obfuscate.set(false)
optimize.set(false)
}
}
}
idea {
this.module {
isDownloadSources = true
}
}