-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle.kts
118 lines (100 loc) · 3.2 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
import org.jetbrains.compose.reload.ComposeHotRun
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeFeatureFlag
plugins {
alias(libs.plugins.multiplatform)
alias(libs.plugins.compose)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.compose.hot.reload)
alias(libs.plugins.kotlinx.serialization)
alias(libs.plugins.ktlint)
}
group = "jp.kaleidot725"
version = "1.5.0"
kotlin {
jvm()
jvmToolchain(17)
composeCompiler {
featureFlags.add(ComposeFeatureFlag.OptimizeNonSkippingGroups)
}
sourceSets.jvmMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(compose.material)
implementation(compose.materialIconsExtended)
implementation(libs.adam)
implementation(libs.lucide)
implementation(libs.kotlin.coroutines)
implementation(libs.kotlinx.coroutines.swing)
implementation(libs.kotlin.serialization)
implementation(libs.koin)
implementation(libs.ktor.core)
implementation(libs.ktor.client.okhttp)
implementation(libs.jSystemThemeDetectorVer)
implementation(libs.coil)
implementation(libs.hot.reload.core)
implementation(libs.hot.reload.analysis)
}
sourceSets.jvmTest.dependencies {
implementation(libs.junit5)
}
}
compose.desktop {
application {
mainClass = "MainKt"
buildTypes.release {
proguard.isEnabled = false
}
nativeDistributions {
packageName = "AdbPad"
modules("jdk.management")
modules("jdk.unsupported")
targetFormats(
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Dmg,
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Msi,
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Deb,
org.jetbrains.compose.desktop.application.dsl.TargetFormat.Exe,
)
jvmArgs(
"-Dapple.awt.application.appearance=NSAppearanceNameDarkAqua",
)
macOS {
bundleID = "jp.kaleidot725.adbpad"
iconFile.set(project.file("icon.icns"))
entitlementsFile.set(project.file("default.entitlements"))
}
windows {
iconFile.set(project.file("icon.ico"))
}
linux {
iconFile.set(project.file("icon.ico"))
}
}
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
subprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
repositories {
// Required to download KtLint
mavenCentral()
}
// Optionally configure plugin
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
debug.set(true)
}
}
configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
reporters {
reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.PLAIN)
reporter(org.jlleitschuh.gradle.ktlint.reporter.ReporterType.CHECKSTYLE)
}
filter {
exclude("**/generated/**")
include("**/kotlin/**")
}
}
// build.gradle.kts
tasks.register<ComposeHotRun>("runHot") {
mainClass.set("MainKt")
}