-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
76 lines (63 loc) · 2.23 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
@file:Suppress("OPT_IN_IS_NOT_ENABLED")
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.7.0"
kotlin("kapt") version "1.7.0"
id("org.jetbrains.compose") version "1.2.0-alpha01-dev741"
}
group = "com.github.purofle"
version = "1.0"
repositories {
mavenCentral()
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
google()
}
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
dependencies {
implementation("org.jetbrains.kotlin:kotlin-parcelize-compiler:1.5.21")
val decomposeVersion = "0.6.0"
testImplementation(kotlin("test"))
implementation(compose.desktop.currentOs)
implementation(compose.material3)
implementation("com.arkivanov.decompose:decompose:$decomposeVersion")
implementation("com.arkivanov.decompose:extensions-compose-jetbrains:$decomposeVersion")
implementation("com.google.dagger:dagger:2.42")
kapt("com.google.dagger:dagger-compiler:2.42")
implementation("org.junit.jupiter:junit-jupiter:5.8.2")
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.guardsquare:proguard-gradle:7.2.0")
}
}
tasks.register<proguard.gradle.ProGuardTask>("obfuscate") {
val packageUberJarForCurrentOS by tasks.getting
dependsOn(packageUberJarForCurrentOS)
val files = packageUberJarForCurrentOS.outputs.files
injars(files)
outjars(files.map { file -> File(file.parentFile, "${file.nameWithoutExtension}.min.jar") })
val library = if (System.getProperty("java.version").startsWith("1.")) "lib/rt.jar" else "jmods"
libraryjars("${System.getProperty("java.home")}/$library")
configuration("proguard-rules.pro")
}
tasks.test {
useJUnit()
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
compose.desktop {
application {
mainClass = "com.example.MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "Example"
packageVersion = "1.0.0"
}
}
}