11import org.jetbrains.kotlin.gradle.dsl.JvmTarget
22
33plugins {
4- kotlin( " jvm " )
5- id( " fabric- loom" )
4+ alias(libs.plugins.kotlin )
5+ alias(libs.plugins. loom)
66 `maven- publish`
7- java
87}
98
109val baseGroup: String by project
11- val lwjglVersion: String by project
1210val modVersion: String by project
1311val modName: String by project
1412
@@ -19,40 +17,28 @@ base {
1917 archivesName = modName
2018}
2119
22- val docVersionsDir = projectDir.resolve(" docs-versions" )
23- val currentVersion = version.toString()
24- val currentVersionDir = docVersionsDir.resolve(currentVersion)
25-
2620repositories {
2721 mavenCentral()
2822 maven(" https://maven.meteordev.org/releases" )
2923 maven(" https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" )
3024}
3125
3226dependencies {
33- minecraft(" com.mojang: minecraft: ${property( " minecraft_version " )} " )
27+ minecraft(libs. minecraft)
3428 mappings(loom.officialMojangMappings())
29+ modImplementation(libs.bundles.fabric)
3530
36- modImplementation(" net.fabricmc:fabric-loader:${property(" loader_version" )} " )
37- modImplementation(" net.fabricmc:fabric-language-kotlin:${property(" fabric_kotlin_version" )} " )
38- modImplementation(" net.fabricmc.fabric-api:fabric-api:${property(" fabric_api_version" )} " )
39-
40- modRuntimeOnly(" me.djtheredstoner:DevAuth-fabric:1.2.2" )
41- runtimeOnly(" org.apache.httpcomponents:httpclient:4.5.14" )
42-
43- modImplementation(" org.lwjgl:lwjgl-nanovg:${lwjglVersion} " )
44- include(" org.lwjgl:lwjgl-nanovg:${lwjglVersion} " )
31+ implementation(libs.nanovg) { include(this ) }
32+ implementation(libs.bundles.included) { include(this ) }
4533
4634 listOf (" windows" , " linux" , " macos" , " macos-arm64" ).forEach {
47- modImplementation(" org.lwjgl:lwjgl-nanovg:${lwjglVersion} :natives-$it " )
48- include(" org.lwjgl:lwjgl-nanovg:${lwjglVersion} :natives-$it " )
35+ implementation(variantOf(libs.nanovg) { classifier(" natives-$it " ) }) {
36+ include(this )
37+ }
4938 }
5039
51- implementation(" meteordevelopment:discord-ipc:1.1" )
52- include(" meteordevelopment:discord-ipc:1.1" )
53-
54- implementation(" org.reflections:reflections:0.10.2" )
55- include(" org.reflections:reflections:0.10.2" )
40+ runtimeOnly(libs.httpclient)
41+ modRuntimeOnly(libs.devauth)
5642}
5743
5844tasks {
@@ -86,7 +72,6 @@ tasks {
8672}
8773
8874java {
89- toolchain {
90- languageVersion.set(JavaLanguageVersion .of(21 ))
91- }
75+ sourceCompatibility = JavaVersion .VERSION_21
76+ targetCompatibility = JavaVersion .VERSION_21
9277}
0 commit comments