Files
PlazmaBukkitMC/patches/api/0003-Use-Gradle-Version-Catalogs.patch
2024-04-29 15:43:49 +09:00

116 lines
5.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <dev@alpha93.kr>
Date: Sun, 14 Jan 2024 19:50:29 +0900
Subject: [PATCH] Use Gradle Version Catalogs
diff --git a/build.gradle.kts b/build.gradle.kts
index 09e541dcbbb43699b4402036b8a3cc86a0ac9aad..085cdd8ccdc27f94b22baab7ea4ac0d02769378f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,11 +9,13 @@ java {
withJavadocJar()
}
+/* // Plazma - Use Gradle Version Catalogs
val annotationsVersion = "24.0.1"
val bungeeCordChatVersion = "1.20-R0.2"
val adventureVersion = "4.16.0"
val slf4jVersion = "2.0.9"
val log4jVersion = "2.17.1"
+ */ // Plazma - Use Gradle Version Catalogs
val apiAndDocs: Configuration by configurations.creating {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
@@ -27,6 +29,7 @@ configurations.api {
}
dependencies {
+ /* // Plazma - Use Gradle Version Catalogs
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:32.1.2-jre")
api("com.google.code.gson:gson:2.10.1")
@@ -39,6 +42,34 @@ dependencies {
api("org.joml:joml:1.10.5")
// Paper start
api("com.googlecode.json-simple:json-simple:1.1.1") {
+ // Plazma start - Use Gradle Version Catalogs
+ */
+ implementation(common.bundles.asm)
+
+ api(api.bundles.api)
+ api(common.snakeyaml)
+ api(common.log4j.api)
+ api(common.maven.provider)
+ api(api.jsonsimple) {
+ isTransitive = false // includes junit
+ }
+
+ apiAndDocs(common.bundles.adventure)
+ apiAndDocs(platform(common.adventure.bom))
+
+ compileOnly(api.findbugs)
+ compileOnly(api.annotations)
+ compileOnly(common.bundles.maven)
+
+ compileOnlyApi(api.checkerqual)
+
+ testImplementation(common.asm.tree)
+ testImplementation(common.bundles.test)
+ testImplementation(common.commons.lang3)
+
+ testCompileOnly(api.bundles.annotations)
+ /*
+ // Plazma end - Use Gradle Version Catalogs
isTransitive = false // includes junit
}
api("it.unimi.dsi:fastutil:8.5.6")
@@ -76,6 +107,7 @@ dependencies {
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:5.11.0")
testImplementation("org.ow2.asm:asm-tree:9.7")
+ */ // Plazma - Use Gradle Version Catalogs
}
// Paper start
@@ -136,25 +168,25 @@ tasks.withType<Javadoc> {
options.use()
options.isDocFilesSubDirs = true
options.links(
- "https://guava.dev/releases/32.1.2-jre/api/docs/",
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
- "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
+ "https://guava.dev/releases/${api.guava.orNull?.version}/api/docs/",
+ "https://javadoc.io/doc/org.yaml/snakeyaml/${common.snakeyaml.orNull?.version}/",
+ "https://javadoc.io/doc/org.jetbrains/annotations/${api.annotations.orNull?.version}/", // Paper - we don't want Java 5 annotations
// "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // Paper - don't link to bungee chat
// Paper start - add missing javadoc links
- "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
+ "https://javadoc.io/doc/org.joml/joml/${api.joml.orNull?.version}/index.html",
+ "https://www.javadoc.io/doc/com.google.code.gson/gson/${api.gson.orNull?.version}",
// Paper end
// Paper start
- "https://jd.advntr.dev/api/$adventureVersion/",
- "https://jd.advntr.dev/text-minimessage/$adventureVersion/",
- "https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
- "https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
- "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
- "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
- "https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
- "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
+ "https://jd.advntr.dev/api/${common.adventure.api.orNull?.version}/",
+ "https://jd.advntr.dev/text-minimessage/${common.adventure.api.orNull?.version}/",
+ "https://jd.advntr.dev/text-serializer-gson/${common.adventure.api.orNull?.version}/",
+ "https://jd.advntr.dev/text-serializer-legacy/${common.adventure.api.orNull?.version}/",
+ "https://jd.advntr.dev/text-serializer-plain/${common.adventure.api.orNull?.version}/",
+ "https://jd.advntr.dev/text-logger-slf4j/${common.adventure.api.orNull?.version}/",
+ "https://javadoc.io/doc/org.slf4j/slf4j-api/${api.slf4j.api.orNull?.version}/",
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/${common.log4j.api.orNull?.version}/",
// Paper end
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.maven.connector.orNull?.version}", // Paper
)
options.tags("apiNote:a:API Note:")