-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
101 lines (82 loc) · 2.61 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
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.jvm)
alias(libs.plugins.compose)
alias(libs.plugins.serialization)
// alias(libs.plugins.gettext)
alias(libs.plugins.buildconfig)
}
group = "Scooper"
version = "0.9.1"
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://jitpack.io")
google()
}
dependencies {
implementation(compose.desktop.currentOs)
implementation(libs.kotlinx.serialization.json)
implementation(libs.koin.core)
implementation(libs.koin.compose)
implementation(libs.koin.logger.slf4j)
implementation(libs.orbit.core)
// implementation("org.jetbrains.kotlinx:atomicfu:0.18.4")
implementation(libs.exposed.core)
implementation(libs.exposed.dao)
implementation(libs.exposed.jdbc)
implementation(libs.exposed.java.time)
implementation(libs.sqlite.jdbc)
implementation(libs.slf4j.api)
implementation(libs.slf4j.simple)
implementation(libs.commons.text)
implementation(libs.kotlin.process)
implementation(libs.reorderable)
// implementation(libs.compose.dnd)
// test
testImplementation(libs.junit.jupiter)
testImplementation(kotlin("test"))
}
compose.desktop {
application {
mainClass = "scooper.ui.MainKt"
nativeDistributions {
targetFormats(TargetFormat.Msi)
modules("java.instrument", "java.sql", "jdk.unsupported", "jdk.accessibility")
// includeAllModules = true
packageName = group.toString()
packageVersion = version.toString()
vendor = "xujl"
windows {
menuGroup = group.toString()
shortcut = true
iconFile.set(project.file("icons/icon.ico"))
}
}
buildTypes.release.proguard {
configurationFiles.from("proguard-rules.pro")
}
}
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn"
}
kotlin {
jvmToolchain(17)
}
// tasks.withType<AbstractJLinkTask> {
// setProperty("stripDebug\$compose", false)
// }
tasks.test {
useJUnitPlatform()
}
fun String.quoted() = "\"$this\""
buildConfig {
packageName("scooper.util")
useKotlinOutput()
// useKotlinOutput { topLevelConstants = true }
buildConfigField("String", "APP_NAME", project.name.quoted())
buildConfigField("String", "APP_VERSION", provider { "${project.version}".quoted() })
}