ItemizerX/build.gradle.kts

114 lines
3.2 KiB
Plaintext
Raw Normal View History

import xyz.jpenilla.runpaper.task.RunServer
2023-06-15 22:21:19 +00:00
plugins {
id("java")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.papermc.paperweight.userdev") version "1.5.5"
id("xyz.jpenilla.run-paper") version "2.1.0"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
2023-06-15 22:21:19 +00:00
}
group = "dev.plex"
version = "2.2"
2023-06-15 22:21:19 +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/")
content {
includeGroup("net.coreprotect")
}
2023-06-15 22:21:19 +00:00
}
}
}
subprojects {
apply(plugin = "java")
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "io.papermc.paperweight.userdev")
dependencies {
if (project.name != "shared") {
implementation(project(":shared"))
}
}
2023-07-16 00:15:14 +00:00
tasks {
assemble {
dependsOn("reobfJar")
}
}
2023-06-15 22:21:19 +00:00
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
bukkit {
name = "ItemizerX"
version = rootProject.version.toString()
description = "A new way to edit your items"
authors = listOf("Focusvity", "Telesphoreo")
main = "dev.plex.itemizerx.ItemizerX"
2023-07-23 19:59:05 +00:00
apiVersion = "1.17"
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 00:07:47 +00:00
// Adapted from PlotSquared
2023-07-23 19:59:05 +00:00
val supportedVersions =
listOf("1.17.1", "1.18.1", "1.18.2", "1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", "1.20", "1.20.1")
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")
dependsOn("reobfJar")
2023-06-15 22:21:19 +00:00
}
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(17)
}
shadowJar {
2023-07-16 03:35:35 +00:00
relocate("org.bstats", "dev.plex.metrics")
2023-06-15 22:21:19 +00:00
}
}
dependencies {
paperDevBundle("1.20.1-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT")
compileOnly("net.coreprotect:coreprotect:21.3")
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"))
implementation(project(path = ":v1_20_R1", configuration = "shadow"))
implementation(project(path = ":v1_19_R3", configuration = "shadow"))
implementation(project(path = ":v1_19_R2", configuration = "shadow"))
implementation(project(path = ":v1_19_R1", configuration = "shadow"))
implementation(project(path = ":v1_18_R2", configuration = "shadow"))
2023-07-23 19:59:05 +00:00
implementation(project(path = ":v1_18_R1", configuration = "shadow"))
implementation(project(path = ":v1_17_R1", configuration = "shadow"))
2023-06-15 22:21:19 +00:00
}