Skip to content

Commit 2a718ea

Browse files
committed
Use Gradle Version Catalog for deps
1 parent efe5b13 commit 2a718ea

5 files changed

Lines changed: 89 additions & 51 deletions

File tree

build.gradle.kts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
plugins {
2-
id("fabric-loom") version "1.14-SNAPSHOT"
2+
alias(libs.plugins.fabric.loom)
33
id("maven-publish")
44
}
55

66
base {
77
archivesName = properties["archives_name"] as String
8-
version = properties["mod_version"] as String
8+
version = libs.versions.mod.version.get()
99
group = properties["maven_group"] as String
1010
}
1111

@@ -45,8 +45,8 @@ repositories {
4545
// Where Is It, JackFredLib
4646
maven {
4747
url = uri("https://maven.jackf.red/releases/")
48-
// Meteor Client
4948
}
49+
// Meteor Client
5050
maven {
5151
name = "meteor-maven"
5252
url = uri("https://maven.meteordev.org/releases")
@@ -61,28 +61,28 @@ repositories {
6161

6262
dependencies {
6363
// Fabric
64-
minecraft("com.mojang:minecraft:${properties["minecraft_version"] as String}")
65-
mappings("net.fabricmc:yarn:${properties["yarn_mappings"] as String}:v2")
66-
modImplementation("net.fabricmc:fabric-loader:${properties["loader_version"] as String}")
64+
minecraft(libs.minecraft)
65+
mappings(variantOf(libs.yarn) { classifier("v2") })
66+
modImplementation(libs.fabric.loader)
6767

6868
// Fabric API
69-
modImplementation("net.fabricmc.fabric-api:fabric-api:${properties["fabric_version"] as String}")
69+
modImplementation(libs.fabric.api)
7070

7171
// Mixin extras
7272
annotationProcessor("io.github.llamalad7:mixinextras-fabric:0.5.0")
7373

7474
// Meteor Client
7575
modImplementation(files("libs\\baritone-unoptimized-fabric-1.15.0-2-gf7a53504.jar"))
76-
modImplementation("meteordevelopment:meteor-client:${properties["minecraft_version"] as String}-SNAPSHOT")
77-
implementation("org.meteordev:starscript:0.2.5")
78-
implementation("meteordevelopment:orbit:0.2.4")
76+
modImplementation(libs.meteor.client)
77+
implementation(libs.starscript)
78+
implementation(libs.orbit)
7979

8080
// Xaero's Mods
81-
modCompileOnly("maven.modrinth:xaeros-world-map:${properties["xwm_fabric_version"] as String}") // Xaero's World Map
82-
modCompileOnly("maven.modrinth:xaeros-minimap:${properties["xmm_fabric_version"] as String}") // Xaero's Minimap
81+
modCompileOnly(libs.xwm) // Xaero's World Map
82+
modCompileOnly(libs.xmm) // Xaero's Minimap
8383

8484
// Chest Tracker
85-
modImplementation("red.jackf:whereisit:${properties["where_is_it_version"] as String}")
85+
modImplementation(libs.whereisit)
8686
}
8787

8888
loom {
@@ -93,7 +93,7 @@ tasks {
9393
processResources {
9494
val propertyMap = mapOf(
9595
"version" to project.version,
96-
"mc_version" to project.property("minecraft_version"),
96+
"mc_version" to libs.versions.minecraft.get(),
9797
"gh_hash" to (System.getenv("GITHUB_SHA") ?: ""),
9898
)
9999

gradle.properties

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,5 @@
11
org.gradle.jvmargs=-Xmx4G
22

3-
# Fabric (https://fabricmc.net/versions.html)
4-
minecraft_version=1.21.11
5-
yarn_mappings=1.21.11+build.3
6-
loader_version=0.18.2
7-
8-
# Fabric API
9-
fabric_version=0.139.5+1.21.11
10-
113
# Mod Properties
12-
mod_version=1.21.11_1.0.9.5
134
maven_group=nekiplay.meteorplus
14-
archives_name=meteor-plus
15-
16-
# Dependency Versions
17-
18-
# Xaero's Mods
19-
# Xaero's World Map (https://modrinth.com/mod/xaeros-world-map/versions)
20-
xwm_fabric_version=1.39.17_Fabric_1.21.9
21-
# Xaero's Minimap (https://modrinth.com/mod/xaeros-minimap/versions)
22-
xmm_fabric_version=25.2.15_Fabric_1.21.9
23-
24-
# Where Is It (https://modrinth.com/mod/where-is-it/versions)
25-
where_is_it_version=2.6.4+1.21.2
26-
# YetAnotherConfigLib (https://github.com/JackFred2/WhereIsIt/blob/1.20.6/gradle.properties)
27-
yacl_version=3.3.2+1.20.4+update.1.20.5-SNAPSHOT+update.1.20.5-SNAPSHOT
28-
29-
# MaLiLib (https://www.curseforge.com/minecraft/mc-mods/malilib/files/all?page=1&pageSize=20)
30-
malilib_fileid=7130809
31-
malilib_projectid=303119
5+
archives_name=meteor-plus

gradle/libs.versions.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[versions]
2+
mod-version = "1.21.11_1.0.9.5"
3+
4+
# Fabric (https://fabricmc.net/develop)
5+
minecraft = "1.21.11"
6+
yarn-mappings = "1.21.11+build.3"
7+
fabric-loader = "0.18.2"
8+
fabric-api = "0.139.5+1.21.11"
9+
10+
# Plugins
11+
# Loom (https://github.com/FabricMC/fabric-loom)
12+
loom = "1.14-SNAPSHOT"
13+
14+
# Meteor (https://github.com/MeteorDevelopment/meteor-client)
15+
meteor = "1.21.11-SNAPSHOT"
16+
# Starscript (https://github.com/MeteorDevelopment/starscript)
17+
starscript = "0.2.5"
18+
# Orbit (https://github.com/MeteorDevelopment/orbit)
19+
orbit = "0.2.4"
20+
21+
# Xaero's Mods
22+
# Xaero's World Map (https://modrinth.com/mod/xaeros-world-map/versions)
23+
xwm = "1.39.17_Fabric_1.21.9"
24+
# Xaero's Minimap (https://modrinth.com/mod/xaeros-minimap/versions)
25+
xmm = "25.2.15_Fabric_1.21.9"
26+
27+
# Where Is It (https://modrinth.com/mod/where-is-it/versions)
28+
whereisit = "2.6.4+1.21.2"
29+
# YetAnotherConfigLib (https://github.com/JackFred2/WhereIsIt/blob/1.20.6/gradle.properties)
30+
yacl = "3.3.2+1.20.4+update.1.20.5-SNAPSHOT+update.1.20.5-SNAPSHOT"
31+
32+
# MaLiLib (https://www.curseforge.com/minecraft/mc-mods/malilib)
33+
malilib = "7130809"
34+
35+
[libraries]
36+
# Fabric base
37+
minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" }
38+
yarn = { module = "net.fabricmc:yarn", version.ref = "yarn-mappings" }
39+
fabric-loader = { module = "net.fabricmc:fabric-loader", version.ref = "fabric-loader" }
40+
41+
# Fabric API
42+
fabric-api = { module = "net.fabricmc.fabric-api:fabric-api", version.ref = "fabric-api" }
43+
44+
# Meteor Client
45+
meteor-client = { module = "meteordevelopment:meteor-client", version.ref = "meteor" }
46+
starscript = { module = "org.meteordev:starscript", version.ref = "starscript" }
47+
orbit = { module = "meteordevelopment:orbit", version.ref = "orbit" }
48+
49+
# Xaero's Mods
50+
xwm = { module = "maven.modrinth:xaeros-world-map", version.ref = "xwm" }
51+
xmm = { module = "maven.modrinth:xaeros-minimap", version.ref = "xmm" }
52+
53+
# Where Is It
54+
whereisit = { module = "red.jackf:whereisit", version.ref = "whereisit" }
55+
# YetAnotherConfigLib
56+
yacl = { module = "dev.isxander.yacl:yet-another-config-lib-fabric", version.ref = "yacl" }
57+
58+
# MaLiLib
59+
malilib = { module = "curse.maven:303119", version.ref = "malilib" }
60+
61+
[plugins]
62+
fabric-loom = { id = "fabric-loom", version.ref = "loom" }

settings.gradle

Lines changed: 0 additions & 10 deletions
This file was deleted.

settings.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pluginManagement {
2+
repositories {
3+
maven {
4+
name = "Fabric"
5+
url = uri("https://maven.fabricmc.net/")
6+
}
7+
mavenCentral()
8+
gradlePluginPortal()
9+
}
10+
}
11+
12+
rootProject.name = "meteor-plus"

0 commit comments

Comments
 (0)