-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
63 lines (53 loc) · 1.82 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
plugins {
application
kotlin("jvm") version "1.8.0"
kotlin("plugin.serialization") version "1.8.0"
id("org.jlleitschuh.gradle.ktlint") version "11.2.0"
}
group = "io.github.zabuzard.discordplays"
version = "3.2-SNAPSHOT"
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
dependencies {
implementation("io.github.oshai:kotlin-logging-jvm:4.0.0-beta-22")
implementation("org.slf4j:slf4j-api:2.0.6")
implementation("org.apache.logging.log4j:log4j-api:2.20.0")
implementation("org.apache.logging.log4j:log4j-core:2.20.0")
implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.20.0")
implementation("net.dv8tion:JDA:5.0.0-beta.5")
implementation("com.github.Zabuzard:coffee-gb:discord_plays_pokemon-SNAPSHOT")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
implementation("com.github.ben-manes.caffeine:caffeine:3.1.5")
testImplementation(kotlin("test"))
}
configurations.implementation {
exclude("org.slf4j", "slf4j-simple")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
application {
mainClass.set("io.github.zabuzard.discordplays.MainKt")
}
tasks {
val fatJar = register<Jar>("fatJar") {
dependsOn.addAll(listOf("compileJava", "compileKotlin", "processResources"))
archiveClassifier.set("standalone")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest { attributes(mapOf("Main-Class" to application.mainClass)) }
val sourcesMain = sourceSets.main.get()
val contents = configurations.runtimeClasspath.get()
.map { if (it.isDirectory) it else zipTree(it) } +
sourcesMain.output
from(contents)
}
build {
dependsOn(fatJar)
}
}