-
-
Notifications
You must be signed in to change notification settings - Fork 294
/
Copy pathbuild.gradle.kts
65 lines (54 loc) · 1.65 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
plugins {
id("org.jetbrains.kotlin.jvm") version("1.7.21")
application
}
java {
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
implementation("com.beust:klaxon:5.5")
implementation("com.github.ajalt:clikt:2.4.0")
implementation("com.illposed.osc:javaosc-core:0.8") {
exclude("org.slf4j", "slf4j-api")
exclude("org.slf4j", "slf4j-ext")
exclude("org.slf4j", "slf4j-log4j12")
exclude("log4j", "log4j")
}
implementation("io.github.soc:directories:11")
// logging
implementation("io.github.microutils:kotlin-logging:1.7.7")
implementation("org.slf4j:slf4j-api:1.7.30")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.17.0")
implementation("org.apache.logging.log4j:log4j-api:2.17.0")
implementation("org.apache.logging.log4j:log4j-core:2.17.0")
testImplementation(kotlin("test"))
testImplementation(kotlin("test-junit"))
}
application {
mainClass.set("io.alda.player.MainKt")
}
val run by tasks.getting(JavaExec::class) {
standardInput = System.`in`
}
val fatJar = task("fatJar", type = Jar::class) {
archiveBaseName.set("${project.name}-fat")
duplicatesStrategy = DuplicatesStrategy.INCLUDE
manifest {
attributes["Main-Class"] = "io.alda.player.MainKt"
attributes["Multi-Release"] = "true"
}
from(configurations.compileClasspath.get().map({ if (it.isDirectory) it else zipTree(it) }))
from(configurations.runtimeClasspath.get().map({ if (it.isDirectory) it else zipTree(it) }))
with(tasks["jar"] as CopySpec)
}
tasks {
"build" {
dependsOn(fatJar)
}
}