diff --git a/.gitignore b/.gitignore index ce3e28246..98e71ebfc 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,7 @@ build/ # IntelliJ .idea -*.iml \ No newline at end of file +*.iml + +# Run Paper/Folia +/AnarchyExploitFixesFolia/run/ \ No newline at end of file diff --git a/AnarchyExploitFixesFolia/build.gradle.kts b/AnarchyExploitFixesFolia/build.gradle.kts index 52c1621c7..0c78b500a 100755 --- a/AnarchyExploitFixesFolia/build.gradle.kts +++ b/AnarchyExploitFixesFolia/build.gradle.kts @@ -1,13 +1,22 @@ plugins { id("me.moomoo.anarchyexploitfixes.wrapper") - id("com.github.johnrengelman.shadow") version "8.1.1" - id("io.papermc.paperweight.userdev") version "1.5.11" + alias(libs.plugins.shadow) + alias(libs.plugins.runpaper) + alias(libs.plugins.userdev) +} + +runPaper.folia.registerTask() + +tasks { + runServer { + minecraftVersion(libs.versions.runpaperversion.get()) + } } dependencies { - compileOnly("dev.folia:folia-api:1.20.2-R0.1-SNAPSHOT") - api("com.github.ben-manes.caffeine:caffeine:3.1.8") // Fast caching - paperweight.foliaDevBundle("1.20.2-R0.1-SNAPSHOT") + compileOnly(libs.folia) + paperweight.foliaDevBundle(libs.versions.foliabundle.get()) + implementation(libs.caffeineJ17) } configure { @@ -15,7 +24,7 @@ configure { targetCompatibility = JavaVersion.VERSION_17 } -tasks.withType { +tasks.shadowJar { archiveFileName = "${rootProject.name}-${project.name}-${project.version}.${archiveExtension.get()}" exclude( "LICENSE", diff --git a/AnarchyExploitFixesLegacy/build.gradle.kts b/AnarchyExploitFixesLegacy/build.gradle.kts index 493387b69..a9c15bcc7 100755 --- a/AnarchyExploitFixesLegacy/build.gradle.kts +++ b/AnarchyExploitFixesLegacy/build.gradle.kts @@ -1,12 +1,12 @@ plugins { id("me.moomoo.anarchyexploitfixes.wrapper") - id("com.github.johnrengelman.shadow") version "8.1.1" + alias(libs.plugins.shadow) } dependencies { - compileOnly("com.destroystokyo.paper:paper-api:1.12.2-R0.1-SNAPSHOT") - api("com.github.cryptomorin:XSeries:9.9.0") // XSeries for cross-version support - api("com.github.ben-manes.caffeine:caffeine:2.9.3") // Fast caching // Use 2.x for Java8 compatibility + compileOnly(libs.paper12) + implementation("com.github.cryptomorin:XSeries:9.9.0") // XSeries for cross-version support + implementation(libs.caffeineJ8) } configure { @@ -14,7 +14,7 @@ configure { targetCompatibility = JavaVersion.VERSION_1_8 } -tasks.withType { +tasks.shadowJar { archiveFileName = "${rootProject.name}-${project.name}-${project.version}.${archiveExtension.get()}" exclude( "LICENSE", diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..47f9ba335 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,21 @@ +metadata.format.version = "1.1" + +[versions] +runpaperversion = "1.20.4" +foliabundle = "1.20.4-R0.1-SNAPSHOT" + +[libraries] +paper = "io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT" +folia = "dev.folia:folia-api:1.20.4-R0.1-SNAPSHOT" +paper12 = "com.destroystokyo.paper:paper-api:1.12.2-R0.1-SNAPSHOT" +configmaster = "com.github.thatsmusic99:ConfigurationMaster-API:v2.0.0-rc.1" +bstats = "org.bstats:bstats-bukkit:3.0.2" +caffeineJ17 = "com.github.ben-manes.caffeine:caffeine:3.1.8" +caffeineJ8 = "com.github.ben-manes.caffeine:caffeine:2.9.3" + +[plugins] +runpaper = { id = "xyz.jpenilla.run-paper", version = "2.2.2" } +shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } +userdev = { id = "io.papermc.paperweight.userdev", version = "1.5.11" } + +[bundles]