1
- // version: 1699290261
1
+ // version: 1706545953
2
2
/*
3
3
DO NOT CHANGE THIS FILE!
4
4
Also, you may replace this file at any time if there is an update available.
@@ -28,27 +28,11 @@ import java.util.concurrent.TimeUnit
28
28
29
29
buildscript {
30
30
repositories {
31
- mavenCentral()
32
-
33
- maven {
34
- name ' forge'
35
- url ' https://maven.minecraftforge.net'
36
- }
37
31
maven {
38
32
// GTNH RetroFuturaGradle and ASM Fork
39
33
name " GTNH Maven"
40
- url " http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
41
- allowInsecureProtocol = true
42
- }
43
- maven {
44
- name ' sonatype'
45
- url ' https://oss.sonatype.org/content/repositories/snapshots/'
46
- }
47
- maven {
48
- name ' Scala CI dependencies'
49
- url ' https://repo1.maven.org/maven2/'
34
+ url " https://nexus.gtnewhorizons.com/repository/public/"
50
35
}
51
-
52
36
mavenLocal()
53
37
}
54
38
}
@@ -64,12 +48,12 @@ plugins {
64
48
id ' org.ajoberstar.grgit' version ' 4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle
65
49
id ' com.github.johnrengelman.shadow' version ' 8.1.1' apply false
66
50
id ' com.palantir.git-version' version ' 3.0.0' apply false
67
- id ' de.undercouch.download' version ' 5.4 .0'
51
+ id ' de.undercouch.download' version ' 5.5 .0'
68
52
id ' com.github.gmazzo.buildconfig' version ' 3.1.0' apply false // Unused, available for addon.gradle
69
53
id ' com.diffplug.spotless' version ' 6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
70
54
id ' com.modrinth.minotaur' version ' 2.+' apply false
71
55
id ' com.matthewprenger.cursegradle' version ' 1.4.0' apply false
72
- id ' com.gtnewhorizons.retrofuturagradle' version ' 1.3.24 '
56
+ id ' com.gtnewhorizons.retrofuturagradle' version ' 1.3.27 '
73
57
}
74
58
75
59
print (" You might want to check out './gradlew :faq' if your build fails.\n " )
@@ -133,11 +117,12 @@ propertyDefaultIfUnset("forceEnableMixins", false)
133
117
propertyDefaultIfUnset(" channel" , " stable" )
134
118
propertyDefaultIfUnset(" mappingsVersion" , " 12" )
135
119
propertyDefaultIfUnset(" usesMavenPublishing" , true )
136
- propertyDefaultIfUnset(" mavenPublishUrl" , " http ://jenkins.usrv.eu:8081/nexus/content/repositories/ releases" )
120
+ propertyDefaultIfUnset(" mavenPublishUrl" , " https ://nexus.gtnewhorizons.com/repository/ releases/ " )
137
121
propertyDefaultIfUnset(" modrinthProjectId" , " " )
138
122
propertyDefaultIfUnset(" modrinthRelations" , " " )
139
123
propertyDefaultIfUnset(" curseForgeProjectId" , " " )
140
124
propertyDefaultIfUnset(" curseForgeRelations" , " " )
125
+ propertyDefaultIfUnset(" versionPattern" , " " )
141
126
propertyDefaultIfUnset(" minimizeShadowedDependencies" , true )
142
127
propertyDefaultIfUnset(" relocateShadowedDependencies" , true )
143
128
// Deprecated properties (kept for backwards compat)
@@ -302,7 +287,7 @@ if (apiPackage) {
302
287
}
303
288
304
289
if (accessTransformersFile) {
305
- for (atFile in accessTransformersFile. split(" , " )) {
290
+ for (atFile in accessTransformersFile. split(" " )) {
306
291
String targetFile = " src/main/resources/META-INF/" + atFile. trim()
307
292
if (! getFile(targetFile). exists()) {
308
293
throw new GradleException (" Could not resolve \" accessTransformersFile\" ! Could not find " + targetFile)
@@ -386,6 +371,7 @@ catch (Exception ignored) {
386
371
// Pulls version first from the VERSION env and then git tag
387
372
String identifiedVersion
388
373
String versionOverride = System . getenv(" VERSION" ) ?: null
374
+ boolean checkVersion = false
389
375
try {
390
376
// Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
391
377
if (versionOverride == null ) {
@@ -404,6 +390,8 @@ try {
404
390
}
405
391
} else if (isDirty) {
406
392
identifiedVersion + = " -${ branchName} +${ gitDetails.gitHash} -dirty"
393
+ } else {
394
+ checkVersion = true
407
395
}
408
396
} else {
409
397
identifiedVersion = versionOverride
@@ -425,6 +413,8 @@ ext {
425
413
426
414
if (identifiedVersion == versionOverride) {
427
415
out. style(Style.Failure ). text(' Override version to ' ). style(Style.Identifier ). text(modVersion). style(Style.Failure ). println (' !\7 ' )
416
+ } else if (checkVersion && versionPattern && ! (identifiedVersion ==~ versionPattern)) {
417
+ throw new GradleException (" Invalid version: '$identifiedVersion ' does not match version pattern '$versionPattern '" )
428
418
}
429
419
430
420
group = " com.github.GTNewHorizons"
@@ -444,18 +434,31 @@ minecraft {
444
434
for (f in replaceGradleTokenInFile. split(' ,' )) {
445
435
tagReplacementFiles. add f
446
436
}
437
+ out. style(Style.Info ). text(' replaceGradleTokenInFile is deprecated! Consider using generateGradleTokenClass.' ). println ()
447
438
}
448
439
if (gradleTokenModId) {
449
- injectedTags. put gradleTokenModId, modId
440
+ if (replaceGradleTokenInFile) {
441
+ injectedTags. put gradleTokenModId, modId
442
+ } else {
443
+ out. style(Style.Failure ). text(' gradleTokenModId is deprecated! The field will no longer be generated.' ). println ()
444
+ }
450
445
}
451
446
if (gradleTokenModName) {
452
- injectedTags. put gradleTokenModName, modName
447
+ if (replaceGradleTokenInFile) {
448
+ injectedTags. put gradleTokenModName, modName
449
+ } else {
450
+ out. style(Style.Failure ). text(' gradleTokenModName is deprecated! The field will no longer be generated.' ). println ()
451
+ }
453
452
}
454
453
if (gradleTokenVersion) {
455
454
injectedTags. put gradleTokenVersion, modVersion
456
455
}
457
456
if (gradleTokenGroupName) {
458
- injectedTags. put gradleTokenGroupName, modGroup
457
+ if (replaceGradleTokenInFile) {
458
+ injectedTags. put gradleTokenGroupName, modGroup
459
+ } else {
460
+ out. style(Style.Failure ). text(' gradleTokenGroupName is deprecated! The field will no longer be generated.' ). println ()
461
+ }
459
462
}
460
463
if (enableGenericInjection. toBoolean()) {
461
464
injectMissingGenerics. set(true )
@@ -588,13 +591,15 @@ afterEvaluate {
588
591
589
592
repositories {
590
593
maven {
591
- name ' Overmind forge repo mirror'
592
- url ' https://gregtech.overminddl1.com/'
594
+ name = " GTNH Maven"
595
+ url = " https://nexus.gtnewhorizons.com/repository/public/"
596
+ // Links for convenience:
597
+ // Simple HTML browsing: https://nexus.gtnewhorizons.com/service/rest/repository/browse/releases/
598
+ // Rich web UI browsing: https://nexus.gtnewhorizons.com/#browse/browse:releases
593
599
}
594
600
maven {
595
- name = " GTNH Maven"
596
- url = " http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
597
- allowInsecureProtocol = true
601
+ name ' Overmind forge repo mirror'
602
+ url ' https://gregtech.overminddl1.com/'
598
603
}
599
604
maven {
600
605
name ' sonatype'
@@ -628,7 +633,7 @@ repositories {
628
633
}
629
634
maven {
630
635
name = " ic2"
631
- url = getURL(" https://maven .ic2.player.to/" , " https://maven2 .ic2.player.to/" )
636
+ url = getURL(" https://maven2 .ic2.player.to/" , " https://maven .ic2.player.to/" )
632
637
content {
633
638
includeGroup " net.industrial-craft"
634
639
}
@@ -646,7 +651,7 @@ repositories {
646
651
647
652
def mixinProviderGroup = " io.github.legacymoddingmc"
648
653
def mixinProviderModule = " unimixins"
649
- def mixinProviderVersion = " 0.1.13 "
654
+ def mixinProviderVersion = " 0.1.15 "
650
655
def mixinProviderSpecNoClassifer = " ${ mixinProviderGroup} :${ mixinProviderModule} :${ mixinProviderVersion} "
651
656
def mixinProviderSpec = " ${ mixinProviderSpecNoClassifer} :dev"
652
657
ext. mixinProviderSpec = mixinProviderSpec
@@ -687,6 +692,8 @@ configurations.all {
687
692
substitute module(' com.github.GTNewHorizons:SpongePoweredMixin' ) using module(mixinProviderSpecNoClassifer) withClassifier(" dev" ) because(" Unimixins replaces other mixin mods" )
688
693
substitute module(' com.github.GTNewHorizons:SpongeMixins' ) using module(mixinProviderSpecNoClassifer) withClassifier(" dev" ) because(" Unimixins replaces other mixin mods" )
689
694
substitute module(' io.github.legacymoddingmc:unimixins' ) using module(mixinProviderSpecNoClassifer) withClassifier(" dev" ) because(" Our previous unimixins upload was missing the dev classifier" )
695
+
696
+ substitute module(' org.scala-lang:scala-library:2.11.1' ) using module(' org.scala-lang:scala-library:2.11.5' ) because(' To allow mixing with Java 8 targets' )
690
697
}
691
698
}
692
699
@@ -793,12 +800,12 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
793
800
}
794
801
795
802
dependencies {
796
- def lwjgl3ifyVersion = ' 1.5.1 '
803
+ def lwjgl3ifyVersion = ' 1.5.7 '
797
804
if (modId != ' lwjgl3ify' ) {
798
805
java17Dependencies(" com.github.GTNewHorizons:lwjgl3ify:${ lwjgl3ifyVersion} " )
799
806
}
800
807
if (modId != ' hodgepodge' ) {
801
- java17Dependencies(' com.github.GTNewHorizons:Hodgepodge:2.3.17 ' )
808
+ java17Dependencies(' com.github.GTNewHorizons:Hodgepodge:2.4.4 ' )
802
809
}
803
810
804
811
java17PatchDependencies(" com.github.GTNewHorizons:lwjgl3ify:${ lwjgl3ifyVersion} :forgePatches" ) {transitive = false }
@@ -973,8 +980,7 @@ if (usesShadowedDependencies.toBoolean()) {
973
980
configurations. runtimeElements. outgoing. artifact(tasks. named(" shadowJar" , ShadowJar ))
974
981
configurations. apiElements. outgoing. artifact(tasks. named(" shadowJar" , ShadowJar ))
975
982
tasks. named(" jar" , Jar ) {
976
- enabled = false
977
- finalizedBy(tasks. shadowJar)
983
+ archiveClassifier. set(' dev-preshadow' )
978
984
}
979
985
tasks. named(" reobfJar" , ReobfuscatedJar ) {
980
986
inputJar. set(tasks. named(" shadowJar" , ShadowJar ). flatMap({it. archiveFile}))
@@ -983,11 +989,6 @@ if (usesShadowedDependencies.toBoolean()) {
983
989
javaComponent. withVariantsFromConfiguration(configurations. shadowRuntimeElements) {
984
990
skip()
985
991
}
986
- for (runTask in [" runClient" , " runServer" , " runClient17" , " runServer17" ]) {
987
- tasks. named(runTask). configure {
988
- dependsOn(" shadowJar" )
989
- }
990
- }
991
992
}
992
993
ext. publishableDevJar = usesShadowedDependencies. toBoolean() ? tasks. shadowJar : tasks. jar
993
994
ext. publishableObfJar = tasks. reobfJar
@@ -1191,7 +1192,7 @@ publishing {
1191
1192
if (usesMavenPublishing. toBoolean() && System . getenv(" MAVEN_USER" ) != null ) {
1192
1193
maven {
1193
1194
url = mavenPublishUrl
1194
- allowInsecureProtocol = mavenPublishUrl. startsWith(" http://" ) // Mostly for the GTNH maven
1195
+ allowInsecureProtocol = mavenPublishUrl. startsWith(" http://" )
1195
1196
credentials {
1196
1197
username = System . getenv(" MAVEN_USER" ) ?: " NONE"
1197
1198
password = System . getenv(" MAVEN_PASSWORD" ) ?: " NONE"
@@ -1310,7 +1311,7 @@ def addCurseForgeRelation(String type, String name) {
1310
1311
1311
1312
// Updating
1312
1313
1313
- def buildscriptGradleVersion = " 8.2.1 "
1314
+ def buildscriptGradleVersion = " 8.5 "
1314
1315
1315
1316
tasks. named(' wrapper' , Wrapper ). configure {
1316
1317
gradleVersion = buildscriptGradleVersion
0 commit comments