-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
78 lines (67 loc) · 1.99 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
val appGroup = "dev.yekta"
val appVersion = "1.0.0"
plugins {
kotlin("jvm") version "1.5.31"
id("org.jetbrains.compose") version "1.0.0"
id("com.github.johnrengelman.shadow") version "7.0.0"
}
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
google()
}
group = appGroup
version = appVersion
dependencies {
// Compose UI
implementation(compose.desktop.currentOs)
// Parsing Commands
implementation("com.github.ajalt.clikt:clikt:3.3.0")
// Loading Configs
implementation("com.sksamuel.hoplite:hoplite-core:1.4.15")
implementation("com.sksamuel.hoplite:hoplite-toml:1.4.15")
}
compose.desktop {
application {
mainClass = "MainKt"
}
}
tasks.processResources {
filesMatching("**/app.properties") {
filter {
it.replace("%APP_GROUP%", appGroup)
it.replace("%APP_VERSION%", appVersion)
}
}
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "13"
kotlinOptions.freeCompilerArgs += "-Xopt-in=androidx.compose.ui.ExperimentalComposeUiApi"
}
tasks.withType<Jar> {
manifest {
attributes["Manifest-Version"] = "1.0"
attributes["Main-Class"] = "Main"
attributes["Project-URL"] = "https://github.com/YektaDev/Kerminal"
attributes["Developer"] = "Ali Khaleqi Yekta"
}
}
// Output: build/libs/Kerminal.jar
tasks.withType<ShadowJar> {
dependsOn(tasks.withType<KotlinCompile>())
archiveBaseName.set("Kerminal")
archiveVersion.set("")
archiveAppendix.set("")
archiveClassifier.set("")
}
// Output: Release/
tasks.register<Copy>("generateProduction") {
dependsOn(tasks.withType<ShadowJar>())
from(
layout.buildDirectory.file("libs/Kerminal.jar"),
layout.projectDirectory.file("defaults/.")
)
into(layout.projectDirectory.dir("Release"))
}