-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
75 lines (62 loc) · 2.32 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
import java.util.Calendar
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.android.lint) apply false
alias(libs.plugins.kotlin.compose) apply false
alias(libs.plugins.jetbrains.compose)
alias(libs.plugins.gradle.doctor) apply false
id("io.github.fluxo-kt.fluxo-kmp-conf")
}
// https://github.com/JetBrains/compose-multiplatform/blob/e1aff75/tutorials/Native_distributions_and_local_execution/README.md#specifying-package-version
val appVersion = libs.versions.version.get()
.substringBefore("-")
.let {
val (a, b) = it.split(".", limit = 3)
if (a == "0") "1.0.$b" else it
}
version = appVersion
group = "io.github.fluxo-kt"
val mainClassName = "MainKt"
tasks.named<Jar>("jar") {
manifest.attributes["Main-Class"] = mainClassName
}
// See JB template and docs:
// https://github.com/JetBrains/compose-multiplatform-desktop-template
// https://github.com/JetBrains/compose-multiplatform/blob/e1aff75/tutorials/Native_distributions_and_local_execution/README.md
fkcSetupKotlinApp {
replaceOutgoingJar = true
shrink { fullMode = true }
shrinkWithProGuard()
experimentalLatestCompilation = true
latestSettingsForTests = true
setupVerification = true
enableApiValidation = true
enableGenericAndroidLint = true
enableGradleDoctor = true
}
dependencies {
// `currentOs` should be used in launcher-sourceSet and in testMain only.
// For a library, use compose.desktop.common.
// With compose.desktop.common you will also lose @Preview functionality.
implementation(compose.desktop.currentOs)
implementation(compose.components.resources)
testImplementation(compose.desktop.uiTestJUnit4)
}
compose.desktop.application {
mainClass = mainClassName
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageVersion = appVersion
packageName = "MyApp"
description = "MyDescription"
vendor = "MyCompany"
val year = Calendar.getInstance().get(Calendar.YEAR)
copyright = "© $year $packageName. All rights reserved."
windows {
shortcut = true
menuGroup = packageName
upgradeUuid = "3d4241d1-0400-401f-bd1f-000fdc8ae989"
}
}
}