-
Notifications
You must be signed in to change notification settings - Fork 36
/
build.gradle.kts
83 lines (75 loc) · 2.75 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
// SPDX-License-Identifier: BSD-3-Clause
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.islandoftex.arara.build.Versions
plugins {
id("io.github.goooler.shadow")
application
jacoco
}
kotlin {
sourceSets {
all {
languageSettings.optIn("org.islandoftex.arara.api.localization.AraraMessages")
languageSettings.optIn("kotlin.time.ExperimentalTime")
languageSettings.optIn("kotlin.RequiresOptIn")
}
val commonMain by getting {
dependencies {
implementation(project(":core"))
implementation(project(":lua"))
implementation("io.github.microutils:kotlin-logging:${Versions.kotlinLogging}")
}
}
val jvmMain by getting {
dependencies {
implementation(project(":core"))
implementation(project(":mvel"))
implementation(kotlin("reflect", Versions.kotlin))
implementation("com.github.ajalt.clikt:clikt:${Versions.clikt}")
implementation("net.mamoe.yamlkt:yamlkt:${Versions.yamlkt}")
implementation("org.mvel:mvel2:${Versions.mvel}")
implementation("org.slf4j:slf4j-api:${Versions.slf4j}")
implementation("io.github.microutils:kotlin-logging:${Versions.kotlinLogging}")
implementation("org.apache.logging.log4j:log4j-core:${Versions.log4j}")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:${Versions.log4j}")
}
}
val jvmTest by getting {
dependencies {
implementation("io.kotest:kotest-runner-junit5-jvm:${Versions.kotest}")
implementation("io.kotest:kotest-assertions-core-jvm:${Versions.kotest}")
}
}
}
}
application {
applicationName = project.name
mainClass.set("$group.cli.CLIKt")
}
tasks {
withType<Copy> {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
named<JavaExec>("run") {
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
doFirst {
jvmArgs = listOf(
"--module-path", classpath.asPath
)
}
}
}
named<Task>("assembleDist").configure {
dependsOn("shadowJar", "jacocoTestReport")
}
named<ShadowJar>("shadowJar").configure {
archiveAppendix.set("with-deps")
archiveClassifier.set("")
minimize {
exclude(dependency("org.jetbrains.kotlin:.*"))
exclude(dependency("org.apache.logging.log4j:log4j-slf4j-impl:.*"))
exclude(dependency("org.mvel:mvel2:.*"))
exclude(dependency("net.java.dev.jna:.*:.*"))
}
}
}