aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-04 17:00:34 +0200
committernea <nea@nea.moe>2023-05-04 17:00:34 +0200
commit1407f00bbe8f7f75fa45e5b7f73222f78ce61459 (patch)
treea0a787900405601eb56c47088f8fa1a120798bf5
parentca8c21f1703b9a114e09d1399f678ae757399bb6 (diff)
downloadfirmament-1407f00bbe8f7f75fa45e5b7f73222f78ce61459.tar.gz
firmament-1407f00bbe8f7f75fa45e5b7f73222f78ce61459.tar.bz2
firmament-1407f00bbe8f7f75fa45e5b7f73222f78ce61459.zip
Add version catalogue
-rw-r--r--build.gradle.kts37
-rw-r--r--gradle/libs.versions.toml40
2 files changed, 56 insertions, 21 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index c3673e2..8d27edc 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -3,8 +3,8 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
`maven-publish`
- kotlin("jvm") version "1.7.10"
- kotlin("plugin.serialization") version "1.7.10"
+ kotlin("jvm") version "1.8.10"
+ kotlin("plugin.serialization") version "1.8.10"
id("dev.architectury.loom") version "1.1.336"
id("com.github.johnrengelman.shadow") version "7.1.2"
id("moe.nea.licenseextractificator") version "fffc76c"
@@ -55,40 +55,35 @@ val transInclude by configurations.creating {
dependencies {
// Minecraft dependencies
- "minecraft"("com.mojang:minecraft:${project.property("minecraft_version")}")
- "mappings"("net.fabricmc:yarn:${project.property("yarn_version")}:v2")
+ "minecraft"(libs.minecraft)
+ "mappings"("net.fabricmc:yarn:${libs.versions.yarn.get()}:v2")
// Fabric dependencies
- modImplementation("net.fabricmc:fabric-loader:${project.property("fabric_loader_version")}")
- modApi("net.fabricmc.fabric-api:fabric-api:${project.property("fabric_api_version")}")
- modImplementation("net.fabricmc:fabric-language-kotlin:${project.property("fabric_kotlin_version")}")
- modApi("dev.architectury:architectury:8.1.79")
+ modImplementation(libs.fabric.loader)
+ modImplementation(libs.fabric.kotlin)
+ modImplementation(libs.libgui)
+ include(libs.libgui)
+ modApi(libs.fabric.api)
+ modApi(libs.architectury)
// Actual dependencies
- modCompileOnly("me.shedaniel:RoughlyEnoughItems-api:${rootProject.property("rei_version")}") {
+ modCompileOnly(libs.rei.api) {
exclude(module = "architectury")
exclude(module = "architectury-fabric")
}
- shadowMe("moe.nea:neurepoparser:0.0.1")
- shadowMe("com.github.hypfvieh:dbus-java-core:${rootProject.property("dbus_java_version")}")
- shadowMe("com.github.hypfvieh:dbus-java-transport-native-unixsocket:${rootProject.property("dbus_java_version")}")
- fun ktor(mod: String) = "io.ktor:ktor-$mod-jvm:${project.property("ktor_version")}"
+ shadowMe(libs.repoparser)
+ shadowMe(libs.bundles.dbus)
+ fun ktor(mod: String) = "io.ktor:ktor-$mod-jvm:${libs.versions.ktor.get()}"
transInclude(implementation(ktor("client-core"))!!)
transInclude(implementation(ktor("client-java"))!!)
transInclude(implementation(ktor("serialization-kotlinx-json"))!!)
transInclude(implementation(ktor("client-content-negotiation"))!!)
- modImplementation(include("io.github.cottonmc:LibGui:${project.property("libgui_version")}")!!)
// Dev environment preinstalled mods
- modRuntimeOnly("dev.architectury:architectury-fabric:8.1.79")
- modRuntimeOnly("me.shedaniel:RoughlyEnoughItems-fabric:${project.property("rei_version")}") {
- exclude(module = "architectury")
- exclude(module = "architectury-fabric")
- }
- modRuntimeOnly("me.djtheredstoner:DevAuth-fabric:${project.property("devauth_version")}")
- modRuntimeOnly("maven.modrinth:modmenu:${project.property("modmenu_version")}")
+ modRuntimeOnly(libs.bundles.runtime.required)
+ modRuntimeOnly(libs.bundles.runtime.optional)
transInclude.resolvedConfiguration.resolvedArtifacts.forEach {
include(it.moduleVersion.id.toString())
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
new file mode 100644
index 0000000..934f853
--- /dev/null
+++ b/gradle/libs.versions.toml
@@ -0,0 +1,40 @@
+[versions]
+minecraft = "1.19.4"
+fabric_loader = "0.14.19"
+fabric_api = "0.80.0+1.19.4"
+fabric_kotlin = "1.9.4+kotlin.1.8.21"
+yarn = "1.19.4+build.2"
+libgui = "7.0.0-rc.1+1.19.4"
+rei = "11.0.597"
+devauth = "1.0.0"
+modmenu = "6.2.1"
+ktor = "2.3.0"
+dbus_java = "4.2.1"
+architectury = "8.1.79"
+neurepoparser = "0.0.1"
+
+[libraries]
+minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
+fabric_loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric_loader" }
+fabric_api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fabric_api" }
+fabric_kotlin = { module = "net.fabricmc:fabric-language-kotlin", version.ref = "fabric_kotlin" }
+architectury = { module = "dev.architectury:architectury", version.ref = "architectury" }
+rei_api = { module = "me.shedaniel:RoughlyEnoughItems-api", version.ref = "rei" }
+repoparser = { module = "moe.nea:neurepoparser", version.ref = "neurepoparser" }
+dbus_java_core = { module = "com.github.hypfvieh:dbus-java-core", version.ref = "dbus_java" }
+dbus_java_unixsocket = { module = "com.github.hypfvieh:dbus-java-transport-native-unixsocket", version.ref = "dbus_java" }
+libgui = { module = "io.github.cottonmc:LibGui", version.ref = "libgui" }
+
+# Runtime:
+architectury_fabric = { module = "dev.architectury:architectury-fabric", version.ref = "architectury" }
+rei_fabric = { module = "me.shedaniel:RoughlyEnoughItems-fabric", version.ref = "rei" }
+devauth = { module = "me.djtheredstoner:DevAuth-fabric", version.ref = "devauth" }
+modmenu = { module = "maven.modrinth:modmenu", version.ref = "modmenu" }
+
+[bundles]
+dbus = ["dbus_java_core", "dbus_java_unixsocket"]
+runtime_required = ["architectury_fabric", "rei_fabric"]
+runtime_optional = ["devauth", "modmenu"]
+
+
+