Skip to content

Commit 49ee844

Browse files
committed
update bs
1 parent b470117 commit 49ee844

File tree

1 file changed

+44
-43
lines changed

1 file changed

+44
-43
lines changed

build.gradle

+44-43
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//version: 1699290261
1+
//version: 1706545953
22
/*
33
DO NOT CHANGE THIS FILE!
44
Also, you may replace this file at any time if there is an update available.
@@ -28,27 +28,11 @@ import java.util.concurrent.TimeUnit
2828

2929
buildscript {
3030
repositories {
31-
mavenCentral()
32-
33-
maven {
34-
name 'forge'
35-
url 'https://maven.minecraftforge.net'
36-
}
3731
maven {
3832
// GTNH RetroFuturaGradle and ASM Fork
3933
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/"
5035
}
51-
5236
mavenLocal()
5337
}
5438
}
@@ -64,12 +48,12 @@ plugins {
6448
id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle
6549
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
6650
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'
6852
id 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle
6953
id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
7054
id 'com.modrinth.minotaur' version '2.+' apply false
7155
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'
7357
}
7458

7559
print("You might want to check out './gradlew :faq' if your build fails.\n")
@@ -133,11 +117,12 @@ propertyDefaultIfUnset("forceEnableMixins", false)
133117
propertyDefaultIfUnset("channel", "stable")
134118
propertyDefaultIfUnset("mappingsVersion", "12")
135119
propertyDefaultIfUnset("usesMavenPublishing", true)
136-
propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases")
120+
propertyDefaultIfUnset("mavenPublishUrl", "https://nexus.gtnewhorizons.com/repository/releases/")
137121
propertyDefaultIfUnset("modrinthProjectId", "")
138122
propertyDefaultIfUnset("modrinthRelations", "")
139123
propertyDefaultIfUnset("curseForgeProjectId", "")
140124
propertyDefaultIfUnset("curseForgeRelations", "")
125+
propertyDefaultIfUnset("versionPattern", "")
141126
propertyDefaultIfUnset("minimizeShadowedDependencies", true)
142127
propertyDefaultIfUnset("relocateShadowedDependencies", true)
143128
// Deprecated properties (kept for backwards compat)
@@ -302,7 +287,7 @@ if (apiPackage) {
302287
}
303288

304289
if (accessTransformersFile) {
305-
for (atFile in accessTransformersFile.split(",")) {
290+
for (atFile in accessTransformersFile.split(" ")) {
306291
String targetFile = "src/main/resources/META-INF/" + atFile.trim()
307292
if (!getFile(targetFile).exists()) {
308293
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
@@ -386,6 +371,7 @@ catch (Exception ignored) {
386371
// Pulls version first from the VERSION env and then git tag
387372
String identifiedVersion
388373
String versionOverride = System.getenv("VERSION") ?: null
374+
boolean checkVersion = false
389375
try {
390376
// Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
391377
if (versionOverride == null) {
@@ -404,6 +390,8 @@ try {
404390
}
405391
} else if (isDirty) {
406392
identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty"
393+
} else {
394+
checkVersion = true
407395
}
408396
} else {
409397
identifiedVersion = versionOverride
@@ -425,6 +413,8 @@ ext {
425413

426414
if (identifiedVersion == versionOverride) {
427415
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'")
428418
}
429419

430420
group = "com.github.GTNewHorizons"
@@ -444,18 +434,31 @@ minecraft {
444434
for (f in replaceGradleTokenInFile.split(',')) {
445435
tagReplacementFiles.add f
446436
}
437+
out.style(Style.Info).text('replaceGradleTokenInFile is deprecated! Consider using generateGradleTokenClass.').println()
447438
}
448439
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+
}
450445
}
451446
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+
}
453452
}
454453
if (gradleTokenVersion) {
455454
injectedTags.put gradleTokenVersion, modVersion
456455
}
457456
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+
}
459462
}
460463
if (enableGenericInjection.toBoolean()) {
461464
injectMissingGenerics.set(true)
@@ -588,13 +591,15 @@ afterEvaluate {
588591

589592
repositories {
590593
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
593599
}
594600
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/'
598603
}
599604
maven {
600605
name 'sonatype'
@@ -628,7 +633,7 @@ repositories {
628633
}
629634
maven {
630635
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/")
632637
content {
633638
includeGroup "net.industrial-craft"
634639
}
@@ -646,7 +651,7 @@ repositories {
646651

647652
def mixinProviderGroup = "io.github.legacymoddingmc"
648653
def mixinProviderModule = "unimixins"
649-
def mixinProviderVersion = "0.1.13"
654+
def mixinProviderVersion = "0.1.15"
650655
def mixinProviderSpecNoClassifer = "${mixinProviderGroup}:${mixinProviderModule}:${mixinProviderVersion}"
651656
def mixinProviderSpec = "${mixinProviderSpecNoClassifer}:dev"
652657
ext.mixinProviderSpec = mixinProviderSpec
@@ -687,6 +692,8 @@ configurations.all {
687692
substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
688693
substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
689694
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')
690697
}
691698
}
692699

@@ -793,12 +800,12 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
793800
}
794801

795802
dependencies {
796-
def lwjgl3ifyVersion = '1.5.1'
803+
def lwjgl3ifyVersion = '1.5.7'
797804
if (modId != 'lwjgl3ify') {
798805
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
799806
}
800807
if (modId != 'hodgepodge') {
801-
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17')
808+
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.4.4')
802809
}
803810

804811
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
@@ -973,8 +980,7 @@ if (usesShadowedDependencies.toBoolean()) {
973980
configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
974981
configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
975982
tasks.named("jar", Jar) {
976-
enabled = false
977-
finalizedBy(tasks.shadowJar)
983+
archiveClassifier.set('dev-preshadow')
978984
}
979985
tasks.named("reobfJar", ReobfuscatedJar) {
980986
inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile}))
@@ -983,11 +989,6 @@ if (usesShadowedDependencies.toBoolean()) {
983989
javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
984990
skip()
985991
}
986-
for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) {
987-
tasks.named(runTask).configure {
988-
dependsOn("shadowJar")
989-
}
990-
}
991992
}
992993
ext.publishableDevJar = usesShadowedDependencies.toBoolean() ? tasks.shadowJar : tasks.jar
993994
ext.publishableObfJar = tasks.reobfJar
@@ -1191,7 +1192,7 @@ publishing {
11911192
if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) {
11921193
maven {
11931194
url = mavenPublishUrl
1194-
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
1195+
allowInsecureProtocol = mavenPublishUrl.startsWith("http://")
11951196
credentials {
11961197
username = System.getenv("MAVEN_USER") ?: "NONE"
11971198
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
@@ -1310,7 +1311,7 @@ def addCurseForgeRelation(String type, String name) {
13101311

13111312
// Updating
13121313

1313-
def buildscriptGradleVersion = "8.2.1"
1314+
def buildscriptGradleVersion = "8.5"
13141315

13151316
tasks.named('wrapper', Wrapper).configure {
13161317
gradleVersion = buildscriptGradleVersion

0 commit comments

Comments
 (0)