Skip to content

Commit 5bcc237

Browse files
authored
update build script version to 1762213476
1 parent 95d0091 commit 5bcc237

File tree

1 file changed

+42
-23
lines changed

1 file changed

+42
-23
lines changed

build.gradle

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
//version: 1743737794
1+
//version: 1762213476
22
/*
33
* DO NOT CHANGE THIS FILE!
44
* Also, you may replace this file at any time if there is an update available.
5-
* Please check https://github.com/GTModpackTeam/Buildscripts/blob/master/build.gradle for updates.
5+
* Please check https://github.com/GregTechCEu/Buildscripts/blob/master/build.gradle for updates.
66
* You can also run ./gradlew updateBuildScript to update your buildscript.
77
*/
88

@@ -50,6 +50,8 @@ def out = services.get(StyledTextOutputFactory).create('an-output')
5050

5151

5252
// Project properties
53+
loadProjectProperties()
54+
5355

5456
// Required properties: we don't know how to handle these being missing gracefully
5557
checkPropertyExists("modName")
@@ -316,14 +318,6 @@ tasks.withType(ScalaCompile).configureEach {
316318
}
317319

318320

319-
// Allow others using this buildscript to have custom gradle code run
320-
if (getFile('addon.gradle').exists()) {
321-
apply from: 'addon.gradle'
322-
} else if (getFile('addon.gradle.kts').exists()) {
323-
apply from: 'addon.gradle.kts'
324-
}
325-
326-
327321
// Configure Minecraft
328322

329323
// Try to gather mod version from git tags if version is not manually specified
@@ -370,11 +364,14 @@ minecraft {
370364

371365
// JVM arguments
372366
extraRunJvmArguments.add("-ea:${modGroup}")
367+
368+
// enable JLine Terminal since idea_rt.jar is no longer added to the classpath
369+
extraRunJvmArguments.add('-Dterminal.jline=true')
373370
if (usesMixins.toBoolean()) {
374371
extraRunJvmArguments.addAll([
375-
'-Dmixin.hotSwap=true',
376-
'-Dmixin.checks.interfaces=true',
377-
'-Dmixin.debug.export=true'
372+
'-Dmixin.hotSwap=true',
373+
'-Dmixin.checks.interfaces=true',
374+
'-Dmixin.debug.export=true'
378375
])
379376
}
380377

@@ -870,9 +867,9 @@ if (enableJava17RunTasks.toBoolean()) {
870867

871868
dependencies {
872869
if (modId != 'lwjgl3ify') {
873-
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.0")
874-
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.0:forgePatches") {
875-
transitive = false
870+
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.1")
871+
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.1:forgePatches") {
872+
transitive = false
876873
}
877874
}
878875
}
@@ -1009,7 +1006,7 @@ abstract class RunHotswappableMinecraftTask extends RunMinecraftTask {
10091006

10101007
if (project.usesMixins.toBoolean()) {
10111008
this.extraJvmArgs.addAll(project.provider(() -> {
1012-
def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(mixinProviderSpec))
1009+
def mixinCfg = project.configurations.detachedConfiguration(project.dependencies.create(project.mixinProviderSpec))
10131010
mixinCfg.canBeConsumed = false
10141011
mixinCfg.canBeResolved = true
10151012
mixinCfg.transitive = false
@@ -1423,11 +1420,11 @@ if (!project.getGradle().startParameter.isOffline() && !Boolean.getBoolean('DISA
14231420
}
14241421

14251422
static URL availableBuildScriptUrl() {
1426-
new URL("https://raw.githubusercontent.com/GTModpackTeam/Buildscripts/master/build.gradle")
1423+
new URL("https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/build.gradle")
14271424
}
14281425

14291426
static URL availableSettingsGradleUrl() {
1430-
new URL("https://raw.githubusercontent.com/GTModpackTeam/Buildscripts/master/settings.gradle")
1427+
new URL("https://raw.githubusercontent.com/GregTechCEu/Buildscripts/master/settings.gradle")
14311428
}
14321429

14331430
boolean performBuildScriptUpdate() {
@@ -1475,14 +1472,28 @@ tasks.register('faq') {
14751472
"To add new dependencies to your project, place them in 'dependencies.gradle', NOT in 'build.gradle' as they would be replaced when the script updates.\n" +
14761473
"To add new repositories to your project, place them in 'repositories.gradle'.\n" +
14771474
"If you need additional gradle code to run, you can place it in a file named 'addon.gradle' (or either of the above, up to you for organization).\n\n" +
1478-
"If your build fails to recognize the syntax of newer Java versions, enable Jabel in your 'gradle.properties' under the option name 'enableModernJavaSyntax'.\n" +
1479-
"To see information on how to configure your IDE properly for Java 17, see https://github.com/GTModpackTeam/Buildscripts/blob/master/docs/jabel.md\n\n" +
1480-
"Report any issues or feature requests you have for this build script to https://github.com/GTModpackTeam/Buildscripts/issues\n")
1475+
"If your build fails to recognize the syntax of newer Java versions, enable Jabel in your 'buildscript.properties' under the option name 'enableModernJavaSyntax'.\n" +
1476+
"To see information on how to configure your IDE properly for Java 17, see https://github.com/GregTechCEu/Buildscripts/blob/master/docs/jabel.md\n\n" +
1477+
"Report any issues or feature requests you have for this build script to https://github.com/GregTechCEu/Buildscripts/issues\n")
14811478
}
14821479
}
14831480

14841481

14851482
// Helpers
1483+
def loadProjectProperties() {
1484+
def configFile = file("buildscript.properties")
1485+
if (configFile.exists()) {
1486+
configFile.withReader {
1487+
def prop = new Properties()
1488+
prop.load(it)
1489+
new ConfigSlurper().parse(prop).forEach { String k, def v ->
1490+
project.ext.setProperty(k, v)
1491+
}
1492+
}
1493+
} else {
1494+
print("Failed to read from buildscript.properties, as it did not exist!")
1495+
}
1496+
}
14861497

14871498
def getDefaultArtifactGroup() {
14881499
def lastIndex = project.modGroup.lastIndexOf('.')
@@ -1495,7 +1506,7 @@ def getFile(String relativePath) {
14951506

14961507
def checkPropertyExists(String propertyName) {
14971508
if (!project.hasProperty(propertyName)) {
1498-
throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/GTModpackTeam/Buildscripts/blob/main/gradle.properties")
1509+
throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"buildscript.properties\" or \"gradle.properties\". You can find all properties and their description here: https://github.com/GregTechCEu/Buildscripts/blob/main/buildscript.properties and https://github.com/GregTechCEu/Buildscripts/blob/main/gradle.properties")
14991510
}
15001511
}
15011512

@@ -1533,3 +1544,11 @@ def getLastTag() {
15331544
return runShell('git describe --abbrev=0 --tags ' +
15341545
(githubTag.isPresent() ? runShell('git rev-list --tags --skip=1 --max-count=1') : ''))
15351546
}
1547+
1548+
1549+
// Allow others using this buildscript to have custom gradle code run
1550+
if (getFile('addon.gradle').exists()) {
1551+
apply from: 'addon.gradle'
1552+
} else if (getFile('addon.gradle.kts').exists()) {
1553+
apply from: 'addon.gradle.kts'
1554+
}

0 commit comments

Comments
 (0)