2023-07-16 03:27:28 +00:00
|
|
|
import xyz.jpenilla.runpaper.task.RunServer
|
|
|
|
|
2023-06-15 22:21:19 +00:00
|
|
|
plugins {
|
|
|
|
id("java")
|
2024-06-15 01:21:56 +00:00
|
|
|
id("io.github.goooler.shadow") version "8.1.7"
|
|
|
|
id("io.papermc.paperweight.userdev") version "1.7.1"
|
|
|
|
id("xyz.jpenilla.run-paper") version "2.3.0"
|
2023-07-16 03:27:28 +00:00
|
|
|
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
|
2023-06-15 22:21:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "dev.plex"
|
2024-06-15 01:21:56 +00:00
|
|
|
version = "2.3"
|
2023-06-15 22:21:19 +00:00
|
|
|
|
2023-07-16 03:27:28 +00:00
|
|
|
allprojects {
|
2023-06-15 22:21:19 +00:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
|
|
|
|
maven {
|
|
|
|
url = uri("https://repo.papermc.io/repository/maven-public/")
|
|
|
|
}
|
|
|
|
|
|
|
|
maven {
|
|
|
|
url = uri("https://maven.playpro.com/")
|
2023-07-16 03:27:28 +00:00
|
|
|
content {
|
|
|
|
includeGroup("net.coreprotect")
|
|
|
|
}
|
2023-06-15 22:21:19 +00:00
|
|
|
}
|
|
|
|
}
|
2023-07-16 03:27:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
apply(plugin = "java")
|
2024-06-15 01:21:56 +00:00
|
|
|
apply(plugin = "io.github.goooler.shadow")
|
2023-07-16 03:27:28 +00:00
|
|
|
apply(plugin = "io.papermc.paperweight.userdev")
|
2023-06-20 05:09:26 +00:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
if (project.name != "shared") {
|
|
|
|
implementation(project(":shared"))
|
|
|
|
}
|
|
|
|
}
|
2023-07-16 03:27:28 +00:00
|
|
|
|
2023-07-16 00:15:14 +00:00
|
|
|
tasks {
|
|
|
|
assemble {
|
|
|
|
dependsOn("reobfJar")
|
|
|
|
}
|
|
|
|
}
|
2023-06-15 22:21:19 +00:00
|
|
|
}
|
|
|
|
|
2023-07-16 03:27:28 +00:00
|
|
|
java {
|
2024-06-15 01:21:56 +00:00
|
|
|
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
2023-07-16 03:27:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bukkit {
|
|
|
|
name = "ItemizerX"
|
|
|
|
version = rootProject.version.toString()
|
|
|
|
description = "A new way to edit your items"
|
|
|
|
authors = listOf("Focusvity", "Telesphoreo")
|
|
|
|
main = "dev.plex.itemizerx.ItemizerX"
|
2024-06-15 01:21:56 +00:00
|
|
|
apiVersion = "1.19"
|
2023-07-16 03:27:28 +00:00
|
|
|
foliaSupported = true
|
|
|
|
softDepend = listOf("CoreProtect")
|
|
|
|
commands {
|
|
|
|
register("itemizer") {
|
|
|
|
description = "The main command for ItemizerX"
|
|
|
|
aliases = listOf("ii", "it")
|
|
|
|
usage = "/<command>"
|
|
|
|
}
|
2023-06-15 22:21:19 +00:00
|
|
|
}
|
2023-07-16 03:27:28 +00:00
|
|
|
}
|
2023-07-16 00:07:47 +00:00
|
|
|
|
2023-07-16 03:27:28 +00:00
|
|
|
// Adapted from PlotSquared
|
2023-07-23 19:59:05 +00:00
|
|
|
val supportedVersions =
|
2024-06-15 01:21:56 +00:00
|
|
|
listOf("1.19.4", "1.20", "1.20.1", "1.20.2", "1.20.4", "1.20.6")
|
2023-07-16 03:27:28 +00:00
|
|
|
tasks {
|
|
|
|
supportedVersions.forEach {
|
|
|
|
register<RunServer>("runServer-$it") {
|
|
|
|
minecraftVersion(it)
|
|
|
|
pluginJars(layout.buildDirectory.file("libs/ItemizerX-${rootProject.version}.jar"))
|
|
|
|
jvmArgs("-DPaper.IgnoreJavaVersion=true", "-Dcom.mojang.eula.agree=true")
|
|
|
|
group = "run paper"
|
|
|
|
runDirectory.set(file("run-$it"))
|
|
|
|
}
|
2023-07-16 00:07:47 +00:00
|
|
|
}
|
|
|
|
|
2023-06-15 22:21:19 +00:00
|
|
|
assemble {
|
|
|
|
dependsOn("shadowJar")
|
2023-07-16 03:27:28 +00:00
|
|
|
dependsOn("reobfJar")
|
2023-06-15 22:21:19 +00:00
|
|
|
}
|
|
|
|
|
2023-07-16 03:27:28 +00:00
|
|
|
compileJava {
|
|
|
|
options.encoding = Charsets.UTF_8.name()
|
2024-06-15 01:21:56 +00:00
|
|
|
options.release.set(21)
|
2023-07-16 03:27:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
2023-07-16 03:35:35 +00:00
|
|
|
relocate("org.bstats", "dev.plex.metrics")
|
2023-06-15 22:21:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2024-06-15 01:21:56 +00:00
|
|
|
paperweight.paperDevBundle("1.20.6-R0.1-SNAPSHOT")
|
|
|
|
compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT")
|
|
|
|
compileOnly("net.coreprotect:coreprotect:22.4")
|
2023-07-16 03:27:28 +00:00
|
|
|
implementation("org.bstats:bstats-base:3.0.2")
|
|
|
|
implementation("org.bstats:bstats-bukkit:3.0.2")
|
2023-06-15 22:21:19 +00:00
|
|
|
implementation(project(path = ":shared", configuration = "shadow"))
|
2024-06-15 01:21:56 +00:00
|
|
|
implementation(project(path = ":v1_20_R4", configuration = "shadow"))
|
2023-12-30 01:43:45 +00:00
|
|
|
implementation(project(path = ":v1_20_R3", configuration = "shadow"))
|
2023-10-08 22:04:40 +00:00
|
|
|
implementation(project(path = ":v1_20_R2", configuration = "shadow"))
|
2023-06-15 22:21:19 +00:00
|
|
|
}
|