@@ -83,10 +83,10 @@ subprojects {
8383
8484 // Define the jar output attributes for all platforms
8585 base {
86- group = project . maven_group
86+ group = " com.viaversion "
8787 archivesName = project. name
88- version = project . maven_version
89- description = project . maven_description
88+ version = " 4.4.0+ " + ( System . getenv( " GITHUB_RUN_NUMBER " ) ?: " unknown " )
89+ description = " Client-side ViaVersion implementation for MinecraftForge and NeoForge "
9090 }
9191
9292 // Get the game version (1.16.5) from the forge version
@@ -107,72 +107,70 @@ subprojects {
107107 library project(" :" ) // Include the base project
108108 }
109109
110- if (applyFg) {
111- minecraft {
112- // Unify to mojang mappings for 1.14+, MCP for below
113- if (versionId >= 1_16_5) {
114- mappings channel : " official" , version : mcVersion
115- }
110+ minecraft {
111+ // Unify to mojang mappings for 1.14+, MCP for below
112+ if (versionId >= 1_16_5) {
113+ mappings channel : " official" , version : mcVersion
114+ }
116115
117- // Official mappings at runtime for 1.20.5+
118- if (versionId >= 1_20_5) {
119- reobf = false
120- }
116+ // Official mappings at runtime for 1.20.5+
117+ if (versionId >= 1_20_5) {
118+ reobf = false
119+ }
121120
122- runs {
123- client {
124- workingDirectory project. file(" run" )
125-
126- property " forge.logging.markers" , " REGISTRIES"
127- property " forge.logging.console.level" , " debug"
128-
129- // mixin
130- property " mixin.debug.export" , " true"
131- property " mixin.hotSwap" , " true"
132- property " fml.coreMods.load" , " com.viaversion.viaforge.mixin.MixinLoader"
133- // Only required for MC 1.12, but modern Forges skips this anyway
134- args " -mixin.config=" + " mixins.viaforge.json"
135-
136- // source set
137- mods {
138- " ${ project.name} " {
139- source sourceSets. main
140- }
121+ runs {
122+ client {
123+ workingDirectory project. file(" run" )
124+
125+ property " forge.logging.markers" , " REGISTRIES"
126+ property " forge.logging.console.level" , " debug"
127+
128+ // mixin
129+ property " mixin.debug.export" , " true"
130+ property " mixin.hotSwap" , " true"
131+ property " fml.coreMods.load" , " com.viaversion.viaforge.mixin.MixinLoader"
132+ // Only required for MC 1.12, but modern Forges skips this anyway
133+ args " -mixin.config=" + " mixins.viaforge.json"
134+
135+ // source set
136+ mods {
137+ " ${ project.name} " {
138+ source sourceSets. main
141139 }
142140 }
143141 }
144142 }
143+ }
145144
146- sourceSets. main. resources {
147- srcDir " src/generated/resources"
148- }
149-
150- dependencies {
151- minecraft " net.minecraftforge:forge:${ forge_version} "
152- library " org.slf4j:slf4j-api:2.0.17"
153-
154- if (versionId >= 1_16_5 && versionId < 1_20_6) {
155- // Always include for refmap in versions that don't have official mappings at runtime,
156- // later exclude classes to prevent loading conflicts...
157- library " org.spongepowered:mixin:${ mixin_version} "
158- annotationProcessor " org.spongepowered:mixin:${ mixin_version} :processor"
159- }
145+ sourceSets. main. resources {
146+ srcDir " src/generated/resources"
147+ }
160148
161- if (versionId >= 1_20_6) {
162- // NeoForge, only to compile against
163- compileOnly(" net.neoforged.fancymodloader:loader:2.0.20" ) { transitive = false }
164- compileOnly(" net.neoforged:bus:8.0.5" ) { transitive = false }
165- }
149+ dependencies {
150+ minecraft " net.minecraftforge:forge:${ forge_version} "
151+ library " org.slf4j:slf4j-api:2.0.17"
152+
153+ if (versionId >= 1_16_5 && versionId < 1_20_6) {
154+ // Always include for refmap in versions that don't have official mappings at runtime,
155+ // later exclude classes to prevent loading conflicts...
156+ library " org.spongepowered:mixin:${ mixin_version} "
157+ annotationProcessor " org.spongepowered:mixin:${ mixin_version} :processor"
166158 }
167159
168- mixin {
169- add sourceSets. main, " mixins.viaforge.refmap.json"
160+ if (versionId >= 1_20_6) {
161+ // NeoForge, only to compile against
162+ compileOnly(" net.neoforged.fancymodloader:loader:2.0.20" ) { transitive = false }
163+ compileOnly(" net.neoforged:bus:8.0.5" ) { transitive = false }
170164 }
165+ }
171166
172- if (versionId < 1_20_6) { // Use official mappings at runtime, otherwise re-obfuscate output
173- reobf {
174- shadowJar {}
175- }
167+ mixin {
168+ add sourceSets. main, " mixins.viaforge.refmap.json"
169+ }
170+
171+ if (versionId < 1_20_6) { // Use official mappings at runtime, otherwise re-obfuscate output
172+ reobf {
173+ shadowJar {}
176174 }
177175 }
178176
@@ -271,7 +269,7 @@ subprojects {
271269 if (versionId == 1_20_1 || versionId >= 1_20_6) {
272270 modLoaders. add(" neoforge" )
273271 }
274- type = ReleaseType . STABLE
272+ type = ReleaseType . ALPHA
275273 dryRun = ! rootProject. hasProperty(" curseforge_publish_token" ) || ! rootProject. hasProperty(" modrinth_publish_token" )
276274
277275 curseforge {
@@ -315,7 +313,7 @@ apply plugin: "net.raphimc.class-token-replacer"
315313sourceSets {
316314 main {
317315 classTokenReplacer {
318- property(" \$ {version}" , project. maven_version )
316+ property(" \$ {version}" , project. version )
319317 }
320318 }
321319}
0 commit comments