-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
67 lines (55 loc) · 1.83 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
67 lines (55 loc) · 1.83 KB
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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
kotlin("jvm") version "2.2.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
application
kotlin("plugin.serialization") version "2.2.0"
id("org.jlleitschuh.gradle.ktlint") version "13.0.0"
}
group = "org.tfcc.bingo"
version = "1.0.0"
repositories {
mavenCentral()
}
dependencies {
implementation("io.netty:netty-all:4.2.3.Final")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0")
implementation("org.apache.logging.log4j:log4j-api:2.25.1")
implementation("org.apache.logging.log4j:log4j-api-kotlin:1.5.0")
implementation("org.apache.logging.log4j:log4j-core:2.25.1")
implementation("org.jetbrains.kotlin:kotlin-reflect:2.2.0")
implementation("org.apache.poi:poi-ooxml:5.4.1")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
implementation("com.squareup.okhttp3:okhttp:5.1.0")
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
}
}
application {
mainClass.set("org.tfcc.bingo.MainKt")
}
tasks.withType<ShadowJar> {
manifest {
attributes(mapOf("Main-Class" to "org.tfcc.bingo.MainKt"))
}
}
tasks.withType<Jar> {
// Otherwise you'll get a "No main manifest attribute" error
manifest {
attributes["Main-Class"] = "org.tfcc.bingo.MainKt"
}
// To avoid the duplicate handling strategy error
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// To add all the dependencies otherwise a "NoClassDefFoundError" error
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}
ktlint {
version.set("1.2.1")
}