-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
executable file
·50 lines (40 loc) · 1.14 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
plugins {
kotlin("jvm") version "1.9.0"
}
group = "net.airone01.deco"
version = "1.0.1-SNAPSHOT"
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.xenondevs.xyz/releases")
maven("https://libraries.minecraft.net/")
}
dependencies {
testImplementation(kotlin("test"))
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
implementation("xyz.xenondevs.invui:invui:1.14")
compileOnly("com.mojang:authlib:1.5.21")
implementation("org.json:json:20171018")
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(17)
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
tasks.withType<Jar> {
manifest {
attributes["Main-Class"] = "net.airone01.deco.Deco"
}
// To avoid the duplicate handling strategy error
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
// add all dependencies to the jar
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
})
}