diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 401901df4..663dae429 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -1,6 +1,6 @@ plugins { `kotlin-dsl` - id("com.diffplug.spotless") + alias(libs.plugins.spotless) } repositories { diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts index 61086d022..b5a0fabf6 100644 --- a/build-logic/settings.gradle.kts +++ b/build-logic/settings.gradle.kts @@ -1,10 +1,7 @@ -import ca.stellardrift.build.configurate.ConfigFormats -import ca.stellardrift.build.configurate.catalog.PolyglotVersionCatalogExtension - -plugins { - id("ca.stellardrift.polyglot-version-catalogs") version "6.0.1" -} - -extensions.configure { - from(ConfigFormats.YAML, file("../gradle/libs.versions.yml")) +dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } } diff --git a/build.gradle.kts b/build.gradle.kts index 0f79a65f5..17d72c5ba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ plugins { id("cloud.parent-build-logic") - id("com.github.ben-manes.versions") + alias(libs.plugins.versions) } subprojects { diff --git a/examples/example-bukkit/build.gradle.kts b/examples/example-bukkit/build.gradle.kts index 0128b3d7b..f64f20a1e 100644 --- a/examples/example-bukkit/build.gradle.kts +++ b/examples/example-bukkit/build.gradle.kts @@ -2,8 +2,8 @@ import xyz.jpenilla.runpaper.task.RunServer plugins { id("cloud.example-conventions") - id("com.github.johnrengelman.shadow") - id("xyz.jpenilla.run-paper") + alias(libs.plugins.shadow) + alias(libs.plugins.run.paper) } dependencies { diff --git a/examples/example-bungee/build.gradle.kts b/examples/example-bungee/build.gradle.kts index a8ea832b4..c78ea9b28 100644 --- a/examples/example-bungee/build.gradle.kts +++ b/examples/example-bungee/build.gradle.kts @@ -1,7 +1,7 @@ plugins { id("cloud.example-conventions") - id("com.github.johnrengelman.shadow") - id("xyz.jpenilla.run-waterfall") + alias(libs.plugins.shadow) + alias(libs.plugins.run.waterfall) } tasks { diff --git a/examples/example-jda/build.gradle.kts b/examples/example-jda/build.gradle.kts index c16c613cb..543947ba7 100644 --- a/examples/example-jda/build.gradle.kts +++ b/examples/example-jda/build.gradle.kts @@ -1,7 +1,7 @@ plugins { application id("cloud.example-conventions") - id("com.github.johnrengelman.shadow") + alias(libs.plugins.shadow) } application { diff --git a/examples/example-velocity/build.gradle.kts b/examples/example-velocity/build.gradle.kts index e8f887b80..2ffe961c3 100644 --- a/examples/example-velocity/build.gradle.kts +++ b/examples/example-velocity/build.gradle.kts @@ -1,7 +1,7 @@ plugins { - id("com.github.johnrengelman.shadow") + alias(libs.plugins.shadow) id("cloud.example-conventions") - id("xyz.jpenilla.run-velocity") + alias(libs.plugins.run.velocity) } indra { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..ddd3c5c3e --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,131 @@ +[plugins] +shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } +versions = { id = "com.github.ben-manes.versions", version = "0.48.0" } +spotless = { id = "com.diffplug.spotless", version.ref = "spotless" } +run-paper = { id = "xyz.jpenilla.run-paper", version.ref = "run-task" } +run-velocity = { id = "xyz.jpenilla.run-velocity", version.ref = "run-task" } +run-waterfall = { id = "xyz.jpenilla.run-waterfall", version.ref = "run-task" } + +[versions] +run-task = "2.2.0" +checkstyle = "10.5.0" +checkerQual = "3.38.0" +errorprone = "2.16" +geantyref = "1.3.14" +jmh = "1.36" +apiguardian = "1.1.2" + +# integration +guice = "4.2.3" + +# kotlin +kotlin = "1.7.22" +dokka = "1.7.20" +coroutines = "1.5.2" +ktlint = "0.50.0" + +# discord +javacord = "3.1.1" +jda = "4.2.1_257" + +# irc +pircbotx = "12f5639c5d" + +# minecraft +guava = "21.0-jre" +brigadier = "1.0.17" +bukkit = "1.13.2-R0.1-SNAPSHOT" +commodore = "2.2" +bungeecord = "1.8-SNAPSHOT" +cloudburst = "1.0.0-SNAPSHOT" +adventureApi = "4.9.3" +adventurePlatform = "4.1.1" +paperApi = "1.16.5-R0.1-SNAPSHOT" +velocityApi = "3.1.0" +spongeApi7 = "7.3.0" +jetbrainsAnnotations = "23.0.0" +fabricMinecraft = "1.19.4" +fabricLoader = "0.14.22" +fabricApi = "0.87.0+1.19.4" +fabricPermissionsApi = "0.2-SNAPSHOT" + +# testing +jupiterEngine = "5.10.0" +mockitoCore = "4.9.0" +mockitoKotlin = "4.1.0" +mockitoJupiter = "4.9.0" +truth = "1.1.3" +compileTesting = "0.20" + +# build-logic +indra = "3.1.3" +gradleTestLogger = "3.2.0" +gradleErrorprone = "3.0.1" +spotless = "6.21.0" +revapi = "1.7.0" + +[libraries] +checkerQual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerQual" } +errorproneCore = { group = "com.google.errorprone", name = "error_prone_core", version.ref = "errorprone" } +errorproneAnnotations = { group = "com.google.errorprone", name = "error_prone_annotations", version.ref = "errorprone" } +geantyref = { group = "io.leangen.geantyref", name = "geantyref", version.ref = "geantyref" } +jmhCore = { group = "org.openjdk.jmh", name = "jmh-core", version.ref = "jmh" } +jmhGeneratorAnnprocess = { group = "org.openjdk.jmh", name = "jmh-generator-annprocess", version.ref = "jmh" } +apiguardian = { group = "org.apiguardian", name = "apiguardian-api", version.ref = "apiguardian" } + +# integration +guice = { group = "com.google.inject", name = "guice", version.ref = "guice" } + +# kotlin +coroutinesCore = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" } +coroutinesJdk8 = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-jdk8", version.ref = "coroutines" } + +# discord +javacord = { group = "org.javacord", name = "javacord", version.ref = "javacord" } +jda = { group = "net.dv8tion", name = "JDA", version.ref = "jda" } + +# irc +pircbotx = { group = "com.github.pircbotx", name = "pircbotx", version.ref = "pircbotx" } + +# minecraft +guava = { group = "com.google.guava", name = "guava", version.ref = "guava" } +brigadier = { group = "com.mojang", name = "brigadier", version.ref = "brigadier" } +bukkit = { group = "org.bukkit", name = "bukkit", version.ref = "bukkit" } +commodore = { group = "me.lucko", name = "commodore", version.ref = "commodore" } +jetbrainsAnnotations = { group = "org.jetbrains", name = "annotations", version.ref = "jetbrainsAnnotations" } +bungeecord = { group = "net.md-5", name = "bungeecord-api", version.ref = "bungeecord" } +cloudburst = { group = "org.cloudburstmc", name = "cloudburst-server", version.ref = "cloudburst" } +adventureApi = { group = "net.kyori", name = "adventure-api", version.ref = "adventureApi" } +adventurePlatformBukkit = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventurePlatform" } +adventurePlatformBungeecord = { group = "net.kyori", name = "adventure-platform-bungeecord", version.ref = "adventurePlatform" } +adventureTextSerializerPlain = { group = "net.kyori", name = "adventure-text-serializer-plain", version.ref = "adventureApi" } +paperApi = { group = "com.destroystokyo.paper", name = "paper-api", version.ref = "paperApi" } +paperMojangApi = { group = "com.destroystokyo.paper", name = "paper-mojangapi", version.ref = "paperApi" } +spongeApi7 = { group = "org.spongepowered", name = "spongeapi", version.ref = "spongeApi7" } +velocityApi = { group = "com.velocitypowered", name = "velocity-api", version.ref = "velocityApi" } +fabricMinecraft = { group = "com.mojang", name = "minecraft", version.ref = "fabricMinecraft" } +fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" } +fabricPermissionsApi = { group = "me.lucko", name = "fabric-permissions-api", version.ref = "fabricPermissionsApi" } + +# testing +jupiterEngine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "jupiterEngine" } +jupiterParams = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "jupiterEngine" } +mockitoCore = { group = "org.mockito", name = "mockito-core", version.ref = "mockitoCore" } +mockitoKotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockitoKotlin" } +mockitoJupiter = { group = "org.mockito", name = "mockito-junit-jupiter", version.ref = "mockitoJupiter" } +truth = { group = "com.google.truth", name = "truth", version.ref = "truth" } +truthJava8 = { group = "com.google.truth.extensions", name = "truth-java8-extension", version.ref = "truth" } +compileTesting = { group = "com.google.testing.compile", name = "compile-testing", version.ref = "compileTesting" } + +# build-logic +indraCommon = { group = "net.kyori", name = "indra-common", version.ref = "indra" } +indraPublishingSonatype = { group = "net.kyori", name = "indra-publishing-sonatype", version.ref = "indra" } +gradleTestLogger = { group = "com.adarshr", name = "gradle-test-logger-plugin", version.ref = "gradleTestLogger" } +gradleErrorprone = { group = "net.ltgt.gradle", name = "gradle-errorprone-plugin", version.ref = "gradleErrorprone" } +gradleKotlinJvm = { group = "org.jetbrains.kotlin.jvm", name = "org.jetbrains.kotlin.jvm.gradle.plugin", version.ref = "kotlin" } +gradleDokka = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokka" } +spotless = { group = "com.diffplug.spotless", name = "spotless-plugin-gradle", version.ref = "spotless" } +revapi = { group = "com.palantir.gradle.revapi", name = "gradle-revapi", version.ref = "revapi" } + +[bundles] +coroutines = ["coroutinesCore", "coroutinesJdk8"] diff --git a/gradle/libs.versions.yml b/gradle/libs.versions.yml deleted file mode 100644 index 50aef2f8e..000000000 --- a/gradle/libs.versions.yml +++ /dev/null @@ -1,278 +0,0 @@ -metadata: - format: { version: 1.0 } - polyglot-extensions: - - plugins - -plugins: - com.github.johnrengelman.shadow: 8.1.1 - com.github.ben-manes.versions: 0.48.0 - com.diffplug.spotless: &spotless 6.21.0 - xyz.jpenilla.run-paper: &run-task 2.1.0 - xyz.jpenilla.run-velocity: *run-task - xyz.jpenilla.run-waterfall: *run-task - -versions: - checkstyle: 10.5.0 - checkerQual: 3.38.0 - errorprone: 2.16 - geantyref: 1.3.14 - jmh: 1.36 - apiguardian: 1.1.2 - - # integration - guice: 4.2.3 - - # kotlin - kotlin: 1.7.22 - dokka: 1.7.20 - coroutines: 1.5.2 - ktlint: 0.50.0 - - # discord - javacord: 3.1.1 - jda: 4.2.1_257 - - # irc - pircbotx: 12f5639c5d - - # minecraft - guava: 21.0-jre - brigadier: 1.0.17 - bukkit: 1.13.2-R0.1-SNAPSHOT - commodore: 2.2 - bungeecord: 1.8-SNAPSHOT - cloudburst: 1.0.0-SNAPSHOT - adventureApi: 4.9.3 - adventurePlatform: 4.1.1 - paperApi: 1.16.5-R0.1-SNAPSHOT - velocityApi: 3.1.0 - spongeApi7: 7.3.0 - jetbrainsAnnotations: 23.0.0 - fabricMinecraft: 1.19.4 - fabricLoader: 0.14.22 - fabricApi: 0.87.0+1.19.4 - fabricPermissionsApi: 0.2-SNAPSHOT - - # testing - jupiterEngine : 5.10.0 - mockitoCore : 4.9.0 - mockitoKotlin : 4.1.0 - mockitoJupiter: 4.9.0 - truth : 1.1.3 - compileTesting: "0.20" - - # build-logic - indra: 3.1.3 - gradleTestLogger: 3.2.0 - gradleErrorprone: 3.0.1 - spotless: *spotless - revapi: 1.7.0 - -dependencies: - checkerQual: - group: org.checkerframework - name: checker-qual - version: { ref: checkerQual } - errorproneCore: - group: com.google.errorprone - name: error_prone_core - version: { ref: errorprone } - errorproneAnnotations: - group: com.google.errorprone - name: error_prone_annotations - version: { ref: errorprone } - geantyref: - group: io.leangen.geantyref - name: geantyref - version: { ref: geantyref } - jmhCore: - group: org.openjdk.jmh - name: jmh-core - version: { ref: jmh } - jmhGeneratorAnnprocess: - group: org.openjdk.jmh - name: jmh-generator-annprocess - version: { ref: jmh } - apiguardian: - group: org.apiguardian - name: apiguardian-api - version: { ref: apiguardian } - - # integration - guice: - group: com.google.inject - name: guice - version: { ref: guice } - - # kotlin - coroutinesCore: - group: org.jetbrains.kotlinx - name: kotlinx-coroutines-core - version: { ref: coroutines } - coroutinesJdk8: - group: org.jetbrains.kotlinx - name: kotlinx-coroutines-jdk8 - version: { ref: coroutines } - - # discord - javacord: - group: org.javacord - name: javacord - version: { ref: javacord } - jda: - group: net.dv8tion - name: JDA - version: { ref: jda } - - # irc - pircbotx: - group: com.github.pircbotx - name: pircbotx - version: { ref: pircbotx } - - # minecraft - guava: - group: com.google.guava - name: guava - version: { ref: guava } - brigadier: - group: com.mojang - name: brigadier - version: { ref: brigadier } - bukkit: - group: org.bukkit - name: bukkit - version: { ref: bukkit } - commodore: - group: me.lucko - name: commodore - version: { ref: commodore } - jetbrainsAnnotations: - group: org.jetbrains - name: annotations - version: { ref: jetbrainsAnnotations } - bungeecord: - group: net.md-5 - name: bungeecord-api - version: { ref: bungeecord } - cloudburst: - group: org.cloudburstmc - name: cloudburst-server - version: { ref: cloudburst } - adventureApi: - group: net.kyori - name: adventure-api - version: { ref: adventureApi } - adventurePlatformBukkit: - group: net.kyori - name: adventure-platform-bukkit - version: { ref: adventurePlatform } - adventurePlatformBungeecord: - group: net.kyori - name: adventure-platform-bungeecord - version: { ref: adventurePlatform } - adventureTextSerializerPlain: - group: net.kyori - name: adventure-text-serializer-plain - version: { ref: adventureApi } - paperApi: - group: com.destroystokyo.paper - name: paper-api - version: { ref: paperApi } - paperMojangApi : - group: com.destroystokyo.paper - name: paper-mojangapi - version: { ref: paperApi } - spongeApi7: - group: org.spongepowered - name: spongeapi - version: { ref: spongeApi7 } - velocityApi: - group: com.velocitypowered - name: velocity-api - version: { ref: velocityApi } - fabricMinecraft: - group: com.mojang - name: minecraft - version: { ref: fabricMinecraft } - fabricLoader: - group: net.fabricmc - name: fabric-loader - version: { ref: fabricLoader } - fabricPermissionsApi: - group: me.lucko - name: fabric-permissions-api - version: { ref: fabricPermissionsApi } - - # testing - jupiterEngine: - group: org.junit.jupiter - name: junit-jupiter-engine - version: { ref: jupiterEngine } - jupiterParams: - group: org.junit.jupiter - name: junit-jupiter-params - version: { ref: jupiterEngine } - mockitoCore: - group: org.mockito - name: mockito-core - version: { ref: mockitoCore } - mockitoKotlin: - group: org.mockito.kotlin - name: mockito-kotlin - version: { ref: mockitoKotlin } - mockitoJupiter: - group: org.mockito - name: mockito-junit-jupiter - version: { ref: mockitoJupiter } - truth: - group: com.google.truth - name: truth - version: { ref: truth } - truthJava8: - group: com.google.truth.extensions - name: truth-java8-extension - version: { ref: truth } - compileTesting: - group: com.google.testing.compile - name: compile-testing - version: { ref: compileTesting } - - # build-logic - indraCommon: - group: net.kyori - name: indra-common - version: { ref: indra } - indraPublishingSonatype: - group: net.kyori - name: indra-publishing-sonatype - version: { ref: indra } - gradleTestLogger: - group: com.adarshr - name: gradle-test-logger-plugin - version: { ref: gradleTestLogger } - gradleErrorprone: - group: net.ltgt.gradle - name: gradle-errorprone-plugin - version: { ref: gradleErrorprone } - gradleKotlinJvm: - group: org.jetbrains.kotlin.jvm - name: org.jetbrains.kotlin.jvm.gradle.plugin - version: { ref: kotlin } - gradleDokka: - group: org.jetbrains.dokka - name: dokka-gradle-plugin - version: { ref: dokka } - spotless: - group: com.diffplug.spotless - name: spotless-plugin-gradle - version: { ref: spotless } - revapi: - group: com.palantir.gradle.revapi - name: gradle-revapi - version: { ref: revapi } - -bundles: - coroutines: - - coroutinesCore - - coroutinesJdk8 diff --git a/settings.gradle.kts b/settings.gradle.kts index 5c3c3e840..0bd6bd9c4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -20,7 +20,6 @@ pluginManagement { } plugins { - id("ca.stellardrift.polyglot-version-catalogs") version "6.0.1" id("quiet-fabric-loom") version "1.3-SNAPSHOT" }