-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle.kts
154 lines (128 loc) · 4.62 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
java
id("io.freefair.lombok") version "8.11"
id("com.gradleup.shadow") version "8.3.5"
id("io.papermc.paperweight.userdev") version "1.7.7"
id("maven-publish")
}
group = "nl.openminetopia"
version = "1.3.0"
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
repositories {
mavenCentral()
maven {
name = "papermc-repo"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
name = "sonatype"
url = uri("https://oss.sonatype.org/content/groups/public/")
}
maven {
name = "aikar"
url = uri("https://repo.aikar.co/content/groups/aikar/")
}
maven {
name = "jitpack"
url = uri("https://jitpack.io")
}
maven {
name = "extendedclip"
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
}
maven {
name = "enginehub"
url = uri("https://maven.enginehub.org/repo/")
}
}
dependencies {
/* Paper */
paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
/* Configuration */
compileOnly("org.spongepowered:configurate-yaml:4.1.2")
compileOnly("org.spongepowered:configurate-core:4.1.2")
/* Database */
compileOnly("com.zaxxer:HikariCP:6.2.1")
compileOnly("mysql:mysql-connector-java:8.0.33")
compileOnly("org.mariadb.jdbc:mariadb-java-client:3.5.1")
compileOnly("org.xerial:sqlite-jdbc:3.47.2.0")
implementation("com.github.Mindgamesnl:storm:e1f961b480")
/* Command Framework */
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")
/* Scoreboard */
val scoreboardLibraryVersion = "2.2.2"
implementation("net.megavex:scoreboard-library-api:$scoreboardLibraryVersion")
runtimeOnly("net.megavex:scoreboard-library-implementation:$scoreboardLibraryVersion")
runtimeOnly("net.megavex:scoreboard-library-modern:$scoreboardLibraryVersion:mojmap")
/* PlaceholderAPI */
compileOnly("me.clip:placeholderapi:2.11.6")
/* WorldGuard */
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.12")
/* PersistentData addons */
implementation("com.jeff-media:custom-block-data:2.2.3")
implementation("com.jeff-media:MorePersistentDataTypes:2.4.0")
/* InventoryLib (JAZZZZ) */
implementation("com.github.Jazzkuh.InventoryLib:spigot:bc68f4f677")
/* bStats */
implementation("org.bstats:bstats-bukkit:3.1.0")
/* Vault */
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
exclude(group = "org.bukkit", module = "bukkit")
}
/* Rest API & Portal dependencies */
compileOnly("io.vertx:vertx-core:4.5.11")
compileOnly("io.vertx:vertx-web:4.5.11")
compileOnly("io.vertx:vertx-web-client:4.5.11")
}
val targetJavaVersion = 21
java {
val javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain {
languageVersion.set(JavaLanguageVersion.of(targetJavaVersion))
}
}
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
options.compilerArgs.add("-parameters")
// options.isFork = true
// options.forkOptions.executable = "javac"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible) {
options.release.set(targetJavaVersion)
}
}
tasks.processResources {
val props = mapOf("version" to version)
inputs.properties(props)
filteringCharset = "UTF-8"
filesMatching("paper-plugin.yml") {
expand(props)
}
}
tasks.named<ShadowJar>("shadowJar") {
archiveFileName.set(rootProject.name + "-" + rootProject.version + ".jar")
relocate("co.aikar.commands", "nl.openminetopia.shaded.acf")
relocate("co.aikar.locales", "nl.openminetopia.shaded.locales")
relocate("net.megavex.scoreboardlibrary", "nl.openminetopia.shaded.scoreboard")
relocate("com.jeff_media.customblockdata", "nl.openminetopia.shaded.customblockdata")
relocate("com.jeff_media.morepersistentdatatypes", "nl.openminetopia.shaded.morepersistentdatatypes")
relocate("com.jazzkuh.inventorylib", "nl.openminetopia.shaded.inventorylib")
relocate("org.bstats", "nl.openminetopia.shaded.bstats")
}
tasks.build {
dependsOn(tasks.named("shadowJar"))
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = group.toString()
artifactId = project.name
version = version.toString()
from(components["java"])
}
}
}