11plugins {
2- id( " fabric- loom" ) version " 1.12-SNAPSHOT "
2+ alias(libs.plugins. fabric. loom)
33}
44
55base {
66 archivesName = properties[" archives_base_name" ] as String
7- version = properties[ " mod_version " ] as String
7+ version = libs.versions.mod.version.get()
88 group = properties[" maven_group" ] as String
99}
1010
@@ -18,40 +18,38 @@ repositories {
1818 name = " meteor-maven-snapshots"
1919 url = uri(" https://maven.meteordev.org/snapshots" )
2020 }
21- flatDir {
22- dirs(" libs" )
23- }
2421}
2522
2623dependencies {
27- // Fabric
28- minecraft(" com.mojang:minecraft:${properties[" minecraft_version" ] as String } " )
29- mappings(" net.fabricmc:yarn:${properties[" yarn_mappings" ] as String } :v2" )
30- modImplementation(" net.fabricmc:fabric-loader:${properties[" loader_version" ] as String } " )
31-
32- // Meteor - using local JAR for consistent version
33- modImplementation(files(" libs/meteor-client-${properties[" meteor_version" ] as String } .jar" ))
24+ // Minecraft
25+ minecraft(libs.minecraft)
26+ mappings(variantOf(libs.yarn) { classifier(" v2" ) })
27+ modImplementation(libs.fabric.loader)
3428
35- // Compile-time access to Orbit event bus (provided by Meteor at runtime)
36- compileOnly(" meteordevelopment:orbit:0.2.4" )
29+ // Meteor Client
30+ modImplementation(libs.meteor.client)
31+ compileOnly(libs.orbit)
3732
3833 // NanoHTTPD for HTTP server and WebSocket support
39- modImplementation(" org.nanohttpd:nanohttpd:2.3.1" )!! .let { include(it) }
40- modImplementation(" org.nanohttpd:nanohttpd-websocket:2.3.1" )!! .let { include(it) }
34+ modImplementation(libs.nanohttpd.core)
35+ include(libs.nanohttpd.core)
36+ modImplementation(libs.nanohttpd.websocket)
37+ include(libs.nanohttpd.websocket)
4138
4239 // JSON serialization for WebSocket messages
43- modImplementation(" com.google.code.gson:gson:2.11.0" )!! .let { include(it) }
40+ modImplementation(libs.gson)
41+ include(libs.gson)
4442
4543 // Testing
46- testImplementation(" org .junit.jupiter:junit-jupiter- api:5.10.2 " )
47- testRuntimeOnly(" org .junit.jupiter:junit-jupiter- engine:5.10.2 " )
44+ testImplementation(libs .junit.api)
45+ testRuntimeOnly(libs .junit.engine)
4846}
4947
5048tasks {
5149 processResources {
5250 val propertyMap = mapOf (
5351 " version" to project.version,
54- " mc_version" to project.property( " minecraft_version " ),
52+ " mc_version" to libs.versions.minecraft.get( ),
5553 )
5654
5755 inputs.properties(propertyMap)
0 commit comments