11import net.earthcomputer.clientcommands.buildscript.CheckLanguageFilesTask
22import net.earthcomputer.clientcommands.buildscript.GenerateBuildInfoTask
3+ import net.fabricmc.loom.task.prod.ClientProductionRunTask
34
45plugins {
5- id ' fabric-loom' version ' 1.9 -SNAPSHOT'
6+ id ' fabric-loom' version ' 1.10 -SNAPSHOT'
67 id ' maven-publish'
78 id ' com.modrinth.minotaur' version ' 2.+'
89 id ' com.github.breadmoirai.github-release' version ' 2.4.1'
@@ -56,6 +57,7 @@ dependencies {
5657 }
5758 modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
5859 modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
60+ productionRuntimeMods " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
5961
6062 include modImplementation(" dev.xpple:clientarguments:${ project.clientarguments_version} " )
6163 include modImplementation(" dev.xpple:betterconfig-fabric:${ project.betterconfig_version} " )
@@ -70,7 +72,10 @@ dependencies {
7072
7173 compileOnly ' com.demonwav.mcdev:annotations:2.0.0'
7274
73- modRuntimeOnly(' me.djtheredstoner:DevAuth-fabric:1.1.0' ) {
75+ modRuntimeOnly(" me.djtheredstoner:DevAuth-fabric:${ project.devauth_version} " ) {
76+ exclude group : ' net.fabricmc' , module : ' fabric-loader'
77+ }
78+ productionRuntimeMods(" me.djtheredstoner:DevAuth-fabric:${ project.devauth_version} " ) {
7479 exclude group : ' net.fabricmc' , module : ' fabric-loader'
7580 }
7681
@@ -133,6 +138,16 @@ tasks.withType(JavaCompile).configureEach {
133138 options. encoding = " UTF-8"
134139}
135140
141+ tasks. register(" prodClient" , ClientProductionRunTask ) {
142+ runDir = file(" run" )
143+
144+ jvmArgs. add(" -Ddevauth.enabled=true" )
145+
146+ javaLauncher = javaToolchains. launcherFor {
147+ languageVersion = JavaLanguageVersion . of(21 )
148+ }
149+ }
150+
136151tasks. register(' sourcesJar' , Jar ) {
137152 dependsOn classes
138153 archiveClassifier. set(" sources" )
0 commit comments