11plugins {
2- id( " net.fabricmc .fabric- loom- remap" ) version " 1.15.0-alpha.6 "
2+ alias(libs.plugins .fabric. loom. remap)
33}
44
55group = " ${project.property(" maven_group" )} "
@@ -16,30 +16,47 @@ repositories {
1616 }
1717 }
1818
19+ maven(" https://maven.pkg.github.com/flowerinsnowdh/FlowerinsnowLib" ) {
20+ content {
21+ includeGroup(" cn.flowerinsnow.flowerinsnowlib" )
22+ }
23+
24+ credentials {
25+ username = " x-access-token"
26+ password = " ${System .getenv(" GITHUB_PKG_R_TOKEN" )} "
27+ }
28+ }
29+
1930 System .getenv(" GRADLE_CENTRAL_MIRROR" )?.let {
2031 maven(it)
2132 }
2233 mavenCentral()
2334}
2435
2536dependencies {
26- minecraft(" com.mojang: minecraft: ${project.property( " minecraft_version " )} " )
37+ minecraft(libs. minecraft)
2738 mappings(loom.officialMojangMappings())
28- modImplementation(" net.fabricmc:fabric-loader:${project.property(" loader_version" )} " )
39+ modImplementation(libs.fabric.loader)
40+
41+ modImplementation(libs.fabric.api)
2942
30- modImplementation(" net.fabricmc.fabric-api:fabric-api: ${project.property( " fabric_version " )} " )
43+ modImplementation(libs.modmenu )
3144
32- modImplementation(" com.terraformersmc:modmenu:${project.property(" modmenu_version" )} " )
45+ include(platform(libs.jackson.bom))
46+ include(libs.jackson.annotations)
47+ include(libs.jackson.core)
48+ include(libs.jackson.databind)
3349
34- include(implementation(" tools.jackson.core:jackson-core:${project.property(" jackson_version" )} " ) as Dependency )
35- include(implementation(" com.fasterxml.jackson.core:jackson-annotations:2.20" ) as Dependency )
36- include(implementation(" tools.jackson.core:jackson-databind:${project.property(" jackson_version" )} " ) as Dependency )
37- include(implementation(" tools.jackson.dataformat:jackson-dataformat-toml:${project.property(" jackson_version" )} " ) as Dependency )
50+ implementation(platform(libs.flowerinsnowlib.bom))
51+ include(platform(libs.flowerinsnowlib.bom))
52+ implementation(libs.flowerinsnowlib.jackson.databind.java11)
53+ include(libs.flowerinsnowlib.jackson.databind.core)
54+ include(libs.flowerinsnowlib.jackson.databind.java11)
3855
39- compileOnly(" org .jetbrains:annotations: ${project.property( " jetbrains_annotations_version " )} " )
56+ compileOnly(libs .jetbrains.annotations )
4057}
4158
42- tasks.processResources {
59+ tasks.named< ProcessResources >( " processResources" ).configure {
4360 val replaceProperties = mapOf (
4461 " version" to " ${project.version} "
4562 )
@@ -52,10 +69,15 @@ tasks.processResources {
5269
5370java {
5471 toolchain {
55- languageVersion = JavaLanguageVersion .of(21 )
72+ languageVersion = JavaLanguageVersion .of(25 )
5673 }
5774}
5875
59- tasks.jar {
76+ tasks.withType<JavaCompile >().configureEach {
77+ options.encoding = " UTF-8"
78+ options.release = 21
79+ }
80+
81+ tasks.named<Jar >(" jar" ).configure {
6082 from(" ../LICENSE" )
61- }
83+ }
0 commit comments