aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason Penilla <[email protected]>2023-11-25 16:03:07 -0800
committerJason Penilla <[email protected]>2023-11-25 17:44:48 -0800
commite5e7c12af8feb1cebb7efca42b7121553537deb2 (patch)
tree86728880ab71594209ad3107a82f5fd017924cd6
parented753d34d20e0a837bce495df6a37da008b78cb9 (diff)
downloadPaper-e5e7c12af8feb1cebb7efca42b7121553537deb2.tar.gz
Paper-e5e7c12af8feb1cebb7efca42b7121553537deb2.zip
Version Catalogs initial POCversion-catalogs
todo - needs release build of multi-version-catalog - need to go through the patches and migrate all the dependencies & versions
-rw-r--r--patches/api/0449-Version-Catalog-POC.patch39
-rw-r--r--patches/server/1053-Version-Catalog-POC.patch27
-rw-r--r--settings.gradle.kts6
3 files changed, 72 insertions, 0 deletions
diff --git a/patches/api/0449-Version-Catalog-POC.patch b/patches/api/0449-Version-Catalog-POC.patch
new file mode 100644
index 0000000000..53422ef12f
--- /dev/null
+++ b/patches/api/0449-Version-Catalog-POC.patch
@@ -0,0 +1,39 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jason Penilla <[email protected]>
+Date: Sat, 25 Nov 2023 16:01:27 -0800
+Subject: [PATCH] Version Catalog POC
+
+
+diff --git a/build.gradle.kts b/build.gradle.kts
+index e827ee211e3c65dc68ac5867fd8476639df63645..76153b68ef7a6cfbea5350229362d52122bf8c35 100644
+--- a/build.gradle.kts
++++ b/build.gradle.kts
+@@ -11,7 +11,7 @@ java {
+
+ val annotationsVersion = "24.0.1"
+ val bungeeCordChatVersion = "1.20-R0.1"
+-val adventureVersion = "4.14.0"
++val adventureVersion = libs.versions.adventure.get()
+ val slf4jVersion = "1.8.0-beta4"
+ val log4jVersion = "2.17.1"
+ val apiAndDocs: Configuration by configurations.creating {
+@@ -32,7 +32,7 @@ dependencies {
+ api("com.google.code.gson:gson:2.10.1")
+ api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.14") // Paper
+ api("org.yaml:snakeyaml:2.2")
+- api("org.joml:joml:1.10.5")
++ api(libs.joml)
+ // Paper start
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
+ isTransitive = false // includes junit
+diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
+new file mode 100644
+index 0000000000000000000000000000000000000000..791bbc8d0d4b277a637c665b20a507e1d44f75f8
+--- /dev/null
++++ b/gradle/libs.versions.toml
+@@ -0,0 +1,5 @@
++[versions]
++adventure = "4.14.0"
++
++[libraries]
++joml = "org.joml:joml:1.10.5"
diff --git a/patches/server/1053-Version-Catalog-POC.patch b/patches/server/1053-Version-Catalog-POC.patch
new file mode 100644
index 0000000000..7e62762502
--- /dev/null
+++ b/patches/server/1053-Version-Catalog-POC.patch
@@ -0,0 +1,27 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jason Penilla <[email protected]>
+Date: Sat, 25 Nov 2023 16:01:16 -0800
+Subject: [PATCH] Version Catalog POC
+
+
+diff --git a/build.gradle.kts b/build.gradle.kts
+index 79beac737c17412913983614bd478d33e3c6ed58..0dec0afa97f9d4a8d0adf2c33589d137dd6a3ebb 100644
+--- a/build.gradle.kts
++++ b/build.gradle.kts
+@@ -18,7 +18,7 @@ dependencies {
+ // Paper start
+ implementation("org.jline:jline-terminal-jansi:3.21.0")
+ implementation("net.minecrell:terminalconsoleappender:1.3.0")
+- implementation("net.kyori:adventure-text-serializer-ansi:4.14.0") // Keep in sync with adventureVersion from Paper-API build file
++ implementation(libs.adventure.text.serializer.ansi)
+ implementation("net.kyori:ansi:1.0.3") // Manually bump beyond above transitive dep
+ /*
+ Required to add the missing Log4j2Plugins.dat file from log4j-core
+diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
+new file mode 100644
+index 0000000000000000000000000000000000000000..3de7b4066dfd57f8074fecf7038393a2c7398059
+--- /dev/null
++++ b/gradle/libs.versions.toml
+@@ -0,0 +1,2 @@
++[libraries]
++adventure-text-serializer-ansi = { module = "net.kyori:adventure-text-serializer-ansi", version.ref = "adventure" }
diff --git a/settings.gradle.kts b/settings.gradle.kts
index f6aac1f56c..463155e7ff 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -9,6 +9,7 @@ pluginManagement {
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
+ id("io.papermc.multi-version-catalog") version "1.0.0-SNAPSHOT"
}
if (!file(".git").exists()) {
@@ -39,6 +40,11 @@ for (name in listOf("Paper-API", "Paper-Server", "Paper-MojangAPI")) {
findProject(":$projName")!!.projectDir = file(name)
}
+multiVersionCatalog.fromFiles(
+ "libs",
+ rootProject.children.map { it.projectDir.resolve("gradle/libs.versions.toml") }
+)
+
mapOf("test-plugin.settings.gradle.kts" to """
// Uncomment to enable the test plugin module
// include(":test-plugin")