-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
52 lines (41 loc) · 1.17 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
plugins {
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.shadow)
`maven-publish`
}
group = "com.volmit"
version = "0.0.1"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
}
dependencies {
// Kotlin standard library
implementation(libs.kotlin.stdlib)
// Kotlin coroutines dependencies
implementation(libs.kotlin.coroutines)
// Kotlin scripting dependencies
implementation(libs.kotlin.scripting.common)
implementation(libs.kotlin.scripting.jvm)
implementation(libs.kotlin.scripting.jvm.host)
implementation(libs.kotlin.scripting.dependencies.maven)
compileOnly(fileTree("libs"))
compileOnly(libs.caffeine)
compileOnly(libs.spigot.api)
compileOnly(libs.dom4j)
}
kotlin {
jvmToolchain(21)
}
tasks.shadowJar {
val files = configurations.get().flatMap { it.files }.distinct()
configurations = listOf()
into(".").from(*files.toTypedArray())
manifest {
attributes("Libraries" to files.joinToString(";") { "${it.name}" })
}
}
publishing.publications.create<MavenPublication>("maven") {
from(components["shadow"])
artifactId = project.name
}