Skip to content

Commit

Permalink
Switch dependency catalog format to TOML for better compatibility wit…
Browse files Browse the repository at this point in the history
…h external tooling
  • Loading branch information
jpenilla committed Nov 8, 2023
1 parent 48aea03 commit 7c33588
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 221 deletions.
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.1.0"
}

extensions.configure<PolyglotVersionCatalogExtension> {
from(ConfigFormats.YAML, file("../gradle/libs.versions.yml"))
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
4 changes: 2 additions & 2 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import ca.stellardrift.build.localization.TemplateType

plugins {
id("tabtps.base")
id("net.kyori.blossom")
id("ca.stellardrift.localization")
alias(libs.plugins.blossom)
alias(libs.plugins.localization)
}

localization {
Expand Down
90 changes: 90 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[plugins]
blossom = { id = "net.kyori.blossom", version = "2.1.0" }
localization = { id = "ca.stellardrift.localization", version = "6.1.0" }
pluginYml-bukkit = { id = "net.minecrell.plugin-yml.bukkit", version = "0.5.3" }
runPaper = { id = "xyz.jpenilla.run-paper", version = "2.2.0" }
sponge-gradle = { id = "org.spongepowered.gradle.plugin", version = "2.2.0" }

[versions]
adventure = "4.14.0"
adventurePagination = "4.0.0-SNAPSHOT"
adventurePlatform = "4.3.1"
cloud = "1.8.4"
cloudSponge = "1.8.0-SNAPSHOT"
commodore = "2.2"
configurate = "4.1.2"
typesafeConfig = "1.4.3"
checkerQual = "3.38.0"
slf4j = "1.7.32"
log4jSlf4jImpl = "2.8.1"
gson = "2.8.0"
guava = "21.0"
bstats = "3.0.2"
paperApi = "1.16.5-R0.1-SNAPSHOT"
paperLib = "1.0.8-SNAPSHOT"
fabricApi = "0.89.2+1.20.2"
fabricLoader = "0.14.22"
minecraft = "1.20.2"
adventurePlatformFabric = "5.10.0"
mixin = "0.8.5"

# buildSrc
indra = "3.1.3"
shadow = "8.1.1"
minotaur = "2.7.5"
hangarPublishPlugin = "0.1.0"

[libraries]
adventureBom = { group = "net.kyori", name = "adventure-bom", version.ref = "adventure" }
adventureApi = { group = "net.kyori", name = "adventure-api" }
adventureTextSerializerLegacy = { group = "net.kyori", name = "adventure-text-serializer-legacy", version.ref = "adventure" }
adventureSerializerConfigurate4 = { group = "net.kyori", name = "adventure-serializer-configurate4", version.ref = "adventure" }
adventureTextFeaturePagination = { group = "net.kyori", name = "adventure-text-feature-pagination", version.ref = "adventurePagination" }
adventurePlatformBukkit = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventurePlatform" }
adventurePlatformFabric = { group = "net.kyori", name = "adventure-platform-fabric", version.ref = "adventurePlatformFabric" }
minimessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure" }

cloudBom = { group = "cloud.commandframework", name = "cloud-bom", version.ref = "cloud" }
cloudCore = { group = "cloud.commandframework", name = "cloud-core" }
cloudMinecraftExtras = { group = "cloud.commandframework", name = "cloud-minecraft-extras", version.ref = "cloud" }
cloudPaper = { group = "cloud.commandframework", name = "cloud-paper" }
cloudSponge = { group = "cloud.commandframework", name = "cloud-sponge", version.ref = "cloudSponge" }
cloudFabric = { group = "cloud.commandframework", name = "cloud-fabric", version.ref = "cloud" }

mixin = { group = "org.spongepowered", name = "mixin", version.ref = "mixin" }

commodore = { group = "me.lucko", name = "commodore", version.ref = "commodore" }

configurateCore = { group = "org.spongepowered", name = "configurate-core", version.ref = "configurate" }
configurateHocon = { group = "org.spongepowered", name = "configurate-hocon", version.ref = "configurate" }
typesafeConfig = { group = "com.typesafe", name = "config", version.ref = "typesafeConfig" }

checkerQual = { group = "org.checkerframework", name = "checker-qual", version.ref = "checkerQual" }

slf4jApi = { group = "org.slf4j", name = "slf4j-api", version.ref = "slf4j" }
slf4jJdk14 = { group = "org.slf4j", name = "slf4j-jdk14", version.ref = "slf4j" }
log4jSlf4jImpl = { group = "org.apache.logging.log4j", name = "log4j-slf4j-impl", version.ref = "log4jSlf4jImpl" }

legacyPluginBase = { group = "xyz.jpenilla", name = "legacy-plugin-base", version = "0.0.1+91-SNAPSHOT" }

gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" }
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }

bstatsBukkit = { group = "org.bstats", name = "bstats-bukkit", version.ref = "bstats" }

paperApi = { group = "com.destroystokyo.paper", name = "paper-api", version.ref = "paperApi" }
paperLib = { group = "io.papermc", name = "paperlib", version.ref = "paperLib" }

fabricApi = { group = "net.fabricmc.fabric-api", name = "fabric-api", version.ref = "fabricApi" }
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" }

# buildSrc
build-indraCommon = { group = "net.kyori", name = "indra-common", version.ref = "indra" }
build-indraLicenser = { group = "net.kyori", name = "indra-licenser-spotless", version.ref = "indra" }
build-shadow = { group = "com.github.johnrengelman", name = "shadow", version.ref = "shadow" }
build-minotaur = { group = "com.modrinth.minotaur", name = "Minotaur", version.ref = "minotaur" }
build-hangarPublishPlugin = { group = "io.papermc", name = "hangar-publish-plugin", version.ref = "hangarPublishPlugin" }

[bundles]
configurate = ["configurateCore", "configurateHocon", "typesafeConfig"]
206 changes: 0 additions & 206 deletions gradle/libs.versions.yml

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pluginManagement {
}

plugins {
id("ca.stellardrift.polyglot-version-catalogs") version "6.1.0"
id("quiet-fabric-loom") version "1.4-SNAPSHOT"
id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT"
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
Expand Down
4 changes: 2 additions & 2 deletions spigot/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("tabtps.platform")
id("net.minecrell.plugin-yml.bukkit")
id("xyz.jpenilla.run-paper")
alias(libs.plugins.pluginYml.bukkit)
alias(libs.plugins.runPaper)
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion sponge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.spongepowered.plugin.metadata.model.PluginDependency

plugins {
id("tabtps.platform")
id("org.spongepowered.gradle.plugin")
alias(libs.plugins.sponge.gradle)
id("org.spongepowered.gradle.vanilla")
}

Expand Down

0 comments on commit 7c33588

Please sign in to comment.