@@ -102,6 +102,9 @@ def normalizeArchiveLineEndings = { details ->
102102}
103103
104104minecraft {
105+ if (gradle. startParameter. offline) {
106+ mavenizerArguments. add(' --offline' )
107+ }
105108 mappings channel : project. mapping_channel, version : project. mapping_version
106109 accessTransformer = ' META-INF/accesstransformer.cfg'
107110
@@ -112,7 +115,9 @@ minecraft {
112115 }
113116 register(' client' )
114117 register(' server' ) {
115- args ' --nogui'
118+ // Forge 13's legacy launcher expects the bare trailing token used
119+ // by the official server command line: `java -jar forge.jar nogui`.
120+ args ' nogui'
116121 }
117122 }
118123}
@@ -326,7 +331,12 @@ version_checking {
326331 }
327332 runOptions. workingDir. set(process. workingDir)
328333 run. workingDir(process. workingDir)
329- run. args(process. args)
334+ // Preserve the target run's bare nogui argument while adding any
335+ // fixture-specific arguments. Replacing the argument list here
336+ // caused every automated Forge 1.11 server to open its Swing GUI.
337+ List<String > effectiveArgs = new ArrayList<> (originalArgs)
338+ effectiveArgs. addAll(process. args)
339+ run. setArgs(effectiveArgs)
330340 run. jvmArgs(process. jvmArgs)
331341 run. systemProperties(process. systemProperties)
332342 run. environment(process. environment)
@@ -1129,10 +1139,14 @@ task benchmarkIntegrationProcess(type: JavaExec, dependsOn: prepareWorldgenBench
11291139 }
11301140 configureFromForgeRun(delegate, ' runServer' )
11311141 doLast {
1132- File latest = new File (benchmarkRunDirectory, ' logs/latest.log' )
11331142 String mode = project. findProperty(' benchmarkMode' ) ?: ' sky'
1134- if (! latest. isFile() || ! latest. text. contains(" ORESPAWN_BENCHMARK summary mode=${ mode} " )) {
1135- throw new GradleException (" Missing ${ mode} worldgen benchmark summary: ${ latest} " )
1143+ String summary = " ORESPAWN_BENCHMARK summary mode=${ mode} "
1144+ List<File > benchmarkLogs = [
1145+ new File (benchmarkRunDirectory, ' logs/fml-server-latest.log' ),
1146+ new File (benchmarkRunDirectory, ' logs/latest.log' )
1147+ ]
1148+ if (! benchmarkLogs. any { it. isFile() && it. getText(' UTF-8' ). contains(summary) }) {
1149+ throw new GradleException (" Missing ${ mode} worldgen benchmark summary in ${ benchmarkLogs} " )
11361150 }
11371151 assertRuntimeLogsClean(benchmarkRunDirectory, " ${ mode} worldgen benchmark" )
11381152 }
@@ -1154,6 +1168,18 @@ tasks.named('processResources', ProcessResources) {
11541168 from(' docs' ) {
11551169 into ' META-INF/orespawn/docs'
11561170 }
1171+ // Pack format 2 is wrapped by Minecraft 1.11's LegacyV2Adapter, which
1172+ // translates a requested lower-case locale such as en_us.lang to the
1173+ // pre-1.11 en_US.lang spelling. Keep the canonical lower-case sources but
1174+ // use target-runtime names in processed production resources. Renaming the
1175+ // single copy also keeps Windows and case-sensitive CI archives identical.
1176+ filesMatching(' assets/orespawn/lang/*.lang' ) {
1177+ def locale = name =~ / ^([a-z]{2})_([a-z]{2})\. lang$/
1178+ if (! locale. matches()) {
1179+ throw new GradleException (" Unexpected locale file name: ${ name} " )
1180+ }
1181+ name = " ${ locale.group(1)} _${ locale.group(2).toUpperCase(java.util.Locale.ROOT)} .lang"
1182+ }
11571183 filesMatching(archiveTextPatterns, normalizeArchiveLineEndings)
11581184}
11591185
@@ -1600,6 +1626,20 @@ tasks.register('verifyReleaseArtifacts') {
16001626 throw new GradleException (" Release jar is missing ${ required} " )
16011627 }
16021628 }
1629+ fileTree(' src/main/resources/assets/orespawn/lang' ) {
1630+ include ' *.lang'
1631+ }. files. each { File source ->
1632+ def locale = source. name =~ / ^([a-z]{2})_([a-z]{2})\. lang$/
1633+ if (! locale. matches()) {
1634+ throw new GradleException (" Unexpected locale file name: ${ source.name} " )
1635+ }
1636+ String alias = " ${ locale.group(1)} _${ locale.group(2).toUpperCase(java.util.Locale.ROOT)} .lang"
1637+ def entry = zip. getEntry(" assets/orespawn/lang/${ alias} " )
1638+ if (entry == null || ! java.util.Arrays . equals(source. bytes,
1639+ zip. getInputStream(entry). withCloseable { it. bytes })) {
1640+ throw new GradleException (" Packaged LegacyV2 locale alias differs for ${ alias} " )
1641+ }
1642+ }
16031643 List<File > trackedDocs = trackedDocumentationFiles()
16041644 if (trackedDocs. size() != 21 ) {
16051645 throw new GradleException (" Expected 21 tracked documentation files, found ${ trackedDocs.size()} " )
0 commit comments