Skip to content

Commit

Permalink
Move version catalog to toml for better compatibility with external t…
Browse files Browse the repository at this point in the history
…ooling
  • Loading branch information
jpenilla committed Nov 9, 2023
1 parent 9fb2d3f commit 17c2d79
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 297 deletions.
2 changes: 1 addition & 1 deletion build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
`kotlin-dsl`
id("com.diffplug.spotless")
alias(libs.plugins.spotless)
}

repositories {
Expand Down
15 changes: 6 additions & 9 deletions build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -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<PolyglotVersionCatalogExtension> {
from(ConfigFormats.YAML, file("../gradle/libs.versions.yml"))
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("cloud.parent-build-logic")
id("com.github.ben-manes.versions")
alias(libs.plugins.versions)
}

subprojects {
Expand Down
4 changes: 2 additions & 2 deletions examples/example-bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions examples/example-bungee/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion examples/example-jda/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
application
id("cloud.example-conventions")
id("com.github.johnrengelman.shadow")
alias(libs.plugins.shadow)
}

application {
Expand Down
4 changes: 2 additions & 2 deletions examples/example-velocity/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
131 changes: 131 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"]
Loading

0 comments on commit 17c2d79

Please sign in to comment.