From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: AlphaKR93 Date: Sun, 14 Jan 2024 19:50:29 +0900 Subject: [PATCH] Build system changes diff --git a/build.gradle.kts b/build.gradle.kts index 0a33275fdf16bda47771bab9ddfeb2bf8616c2dc..dfc2fe81a776acc490189d96c195dea1be7ca690 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,11 +9,13 @@ java { withJavadocJar() } +/* // Plazma - Use libs.versions.toml val annotationsVersion = "24.0.1" val bungeeCordChatVersion = "1.20-R0.1" val adventureVersion = "4.15.0" val slf4jVersion = "2.0.9" val log4jVersion = "2.17.1" + */ // Plazma - Use libs.versions.toml val apiAndDocs: Configuration by configurations.creating { attributes { attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION)) @@ -28,6 +30,7 @@ configurations.api { dependencies { // api dependencies are listed transitively to API consumers + /* // Plazma - Use libs.versions.toml api("com.google.guava:guava:32.1.2-jre") api("com.google.code.gson:gson:2.10.1") // Paper start - adventure @@ -38,9 +41,35 @@ dependencies { api("org.yaml:snakeyaml:2.2") api("org.joml:joml:1.10.5") // Paper start - api("com.googlecode.json-simple:json-simple:1.1.1") { + // Plazma start + */ + implementation(common.bundles.asm) + + 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) + + api(api.bundles.api) + api(common.snakeyaml) + api(common.log4j.api) + api(common.maven.provider) + + apiAndDocs(common.bundles.adventure) + apiAndDocs(platform(common.adventure.bom)) + + api(api.jsonsimple) { + // Plazma end isTransitive = false // includes junit } + /* // Plazma - Use libs.versions.toml api("it.unimi.dsi:fastutil:8.5.6") apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion")) apiAndDocs("net.kyori:adventure-api") @@ -76,6 +105,7 @@ dependencies { testImplementation("org.hamcrest:hamcrest:2.2") testImplementation("org.mockito:mockito-core:5.5.0") testImplementation("org.ow2.asm:asm-tree:9.5") + */ // Plazma - Use libs.versions.toml } // Paper start @@ -136,25 +166,27 @@ tasks.withType { 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 + // Plazma start - Use libs.versions.toml + "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 + // Plazma end ) options.tags("apiNote:a:API Note:")