1
1
import net.earthcomputer.clientcommands.buildscript.CheckLanguageFilesTask
2
2
import net.earthcomputer.clientcommands.buildscript.GenerateBuildInfoTask
3
+ import net.fabricmc.loom.task.prod.ClientProductionRunTask
3
4
4
5
plugins {
5
- id ' fabric-loom' version ' 1.9 -SNAPSHOT'
6
+ id ' fabric-loom' version ' 1.10 -SNAPSHOT'
6
7
id ' maven-publish'
7
8
id ' com.modrinth.minotaur' version ' 2.+'
8
9
id ' com.github.breadmoirai.github-release' version ' 2.4.1'
@@ -56,6 +57,7 @@ dependencies {
56
57
}
57
58
modImplementation " net.fabricmc:fabric-loader:${ project.loader_version} "
58
59
modImplementation " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
60
+ productionRuntimeMods " net.fabricmc.fabric-api:fabric-api:${ project.fabric_version} "
59
61
60
62
include modImplementation(" dev.xpple:clientarguments:${ project.clientarguments_version} " )
61
63
include modImplementation(" dev.xpple:betterconfig-fabric:${ project.betterconfig_version} " )
@@ -70,7 +72,10 @@ dependencies {
70
72
71
73
compileOnly ' com.demonwav.mcdev:annotations:2.0.0'
72
74
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} " ) {
74
79
exclude group : ' net.fabricmc' , module : ' fabric-loader'
75
80
}
76
81
@@ -133,6 +138,16 @@ tasks.withType(JavaCompile).configureEach {
133
138
options. encoding = " UTF-8"
134
139
}
135
140
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
+
136
151
tasks. register(' sourcesJar' , Jar ) {
137
152
dependsOn classes
138
153
archiveClassifier. set(" sources" )
0 commit comments