Skip to content

Commit

Permalink
Properly use dependency catalog in build script, Loom 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
LostLuma committed Oct 18, 2023
1 parent 5397f64 commit 4683833
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
15 changes: 12 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ base {
archivesName = project.archives_base_name
}

loom {
mods {
"server_stats" {
sourceSet("main")
dependency(libs.gson.get())
}
}
}

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
Expand All @@ -28,11 +37,11 @@ dependencies {
minecraft libs.minecraft

mappings loom.layered {
mappings "net.ornithemc:feather:${libs.versions.minecraft.get()}+build.${libs.versions.feather.build.get()}:v2"
addLayer ploceus.nestedMappings()
mappings variantOf(libs.feather) { classifier("v2") }
addLayer ploceus.nestedMappings() // Required for nests
}
nests "net.ornithemc:nests:${libs.versions.minecraft.get()}+build.${libs.versions.nests.build.get()}"

nests libs.nests
modImplementation libs.quilt.loader

shadow libs.gson
Expand Down
15 changes: 8 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
[versions]
# The latest versions are available at https://lambdaurora.dev/tools/import_quilt.html
minecraft = "1.3.2"
quilt_loader = "0.19.2"
quilt_loader = "0.20.2"

feather_build = "11"
nests_build = "1"
nests = "1.3.2+build.1"
feather = "1.3.2+build.11"

gson = "2.10.1"

[libraries]
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
quilt_loader = { module = "org.quiltmc:quilt-loader", version.ref = "quilt_loader" }

nests = { module = "net.ornithemc:nests", version.ref = "nests" }
feather = { module = "net.ornithemc:feather", version.ref = "feather" }

gson = { module = "com.google.code.gson:gson", version.ref = "gson" }

# If you have multiple similar dependencies, you can declare a dependency bundle and reference it on the build script with "libs.bundles.example".
[bundles]

[plugins]
ploceus = { id = "ploceus", version = "1.3.6" }
quilt_loom = { id = "org.quiltmc.loom", version = "1.3.1" }
ploceus = { id = "ploceus", version = "1.4.2" }
quilt_loom = { id = "org.quiltmc.loom", version = "1.4.1" }
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }

0 comments on commit 4683833

Please sign in to comment.