-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle.kts
107 lines (90 loc) · 2.98 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
id("java")
kotlin("jvm") version "2.1.0"
id("com.gradleup.shadow") version "9.0.0-beta5"
}
group = "dev.confusedalex"
version = "1.8.2"
repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") // SpigotAPI
maven("https://jitpack.io") // VaultAPI
maven("https://repo.glaremasters.me/repository/towny/") // Towny
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // PlaceholderAPI
maven("https://repo.aikar.co/content/groups/aikar/") // ACF
maven("https://repo.papermc.io/repository/maven-public/") // MockBukkit
}
dependencies {
// Plugins
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") { isTransitive = false }
compileOnly("com.palmergames.bukkit.towny:towny:0.98.1.0")
compileOnly("me.clip:placeholderapi:2.11.6")
// Internal
compileOnly("org.spigotmc:spigot-api:1.21.4-R0.1-SNAPSHOT")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.1.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.1")
implementation("org.apache.commons:commons-lang3:3.17.0")
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")
// Tests
testImplementation("org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.25.2") {
// Exclude the JetBrains annotations to prevent conflicts
exclude(group = "org.jetbrains", module = "annotations")
}
testImplementation("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
testImplementation(platform("org.junit:junit-bom:5.11.4"))
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
withSourcesJar()
withJavadocJar()
}
tasks {
build {
dependsOn(shadowJar)
}
compileJava {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
sourceCompatibility = "17"
targetCompatibility = "17"
}
compileKotlin {
compilerOptions.jvmTarget.set(JvmTarget.JVM_17)
}
compileTestJava {
options.encoding = "UTF-8"
sourceCompatibility = "21"
targetCompatibility = "21"
}
compileTestKotlin {
compilerOptions.jvmTarget.set(JvmTarget.JVM_21)
}
// Disable the default JAR task
jar {
enabled = false
}
javadoc {
options.encoding = "UTF-8"
}
shadowJar {
archiveClassifier.set("")
enableRelocation = true
relocationPrefix = "confusedalex.thegoldeconomy.libs"
exclude("META-INF/**")
from("LICENSE")
minimize()
}
test {
useJUnitPlatform()
}
}
configurations {
configurations.testImplementation.get().apply {
extendsFrom(configurations.compileOnly.get())
exclude("org.spigotmc", "spigot-api")
}
}