Skip to content

Commit 0d90a80

Browse files
authored
Merge branch 'master' into namespaced-jei-info
2 parents f6ec22e + 70bfc8a commit 0d90a80

File tree

682 files changed

+30367
-15666
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

682 files changed

+30367
-15666
lines changed

.github/actions/build_setup/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ runs:
1212

1313
steps:
1414
- name: Set up JDK 17
15-
uses: actions/setup-java@v4
15+
uses: actions/setup-java@v5
1616
with:
1717
distribution: zulu
1818
java-version: 17
1919

2020
- name: Setup Gradle
21-
uses: gradle/actions/setup-gradle@v3
21+
uses: gradle/actions/setup-gradle@v5
2222
with:
2323
cache-write-only: ${{ inputs.update-cache }}
2424
generate-job-summary: false

.github/workflows/format_java.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
formatting:
1616
name: Formatting
1717
runs-on: ubuntu-latest
18+
env:
19+
DISABLE_BUILDSCRIPT_UPDATE_CHECK: true
1820

1921
steps:
2022
- name: Checkout Repository
21-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2224

2325
- name: Setup Build
2426
uses: ./.github/actions/build_setup

.github/workflows/nuclear_test_release.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/publish_project.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,18 @@ jobs:
2424
permissions:
2525
contents: write # needed to create GitHub releases
2626

27+
env:
28+
DISABLE_BUILDSCRIPT_UPDATE_CHECK: true
29+
2730
steps:
2831
- name: Checkout Repository
29-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3033

3134
- name: Setup Build
3235
uses: ./.github/actions/build_setup
3336

37+
# When updating to RFG 2.0, enable Gradle Configuration Cache
38+
# https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#saving-configuration-cache-data
3439
- name: Build Project
3540
run: ./gradlew build --warning-mode all --build-cache
3641

.github/workflows/test_java.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
test:
1616
name: Tests
1717
runs-on: ubuntu-latest
18+
env:
19+
DISABLE_BUILDSCRIPT_UPDATE_CHECK: true
1820

1921
steps:
2022
- name: Checkout Repository
21-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2224

2325
- name: Setup Build
2426
uses: ./.github/actions/build_setup

.github/workflows/update_buildscript.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Checkout Repository
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
2323

2424
- name: Setup Build
2525
uses: ./.github/actions/build_setup
@@ -35,7 +35,7 @@ jobs:
3535
3636
- name: Create Pull Request
3737
id: create-pull-request
38-
uses: peter-evans/create-pull-request@v6
38+
uses: peter-evans/create-pull-request@v7
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.BUILDSCRIPT_UPDATER_TOKEN }}
4141
with:

.github/workflows/update_gradle_cache.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ jobs:
1616
update-cache:
1717
name: Update Grade Cache
1818
runs-on: ubuntu-latest
19+
env:
20+
DISABLE_BUILDSCRIPT_UPDATE_CHECK: true
1921

2022
steps:
2123
- name: Checkout Repository
22-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2325

2426
- name: Setup Build
2527
uses: ./.github/actions/build_setup

.github/workflows/validate_gradle_wrapper.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ thumbs.db
1616
*.war
1717
*.ear
1818
*.txt
19+
*.ase
1920

2021
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2122
hs_err_pid*
@@ -74,6 +75,7 @@ local.properties
7475
/classes/
7576
/out/
7677
/build/
78+
.run/
7779

7880
# Linux
7981
*~

build.gradle

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//version: 1723428048
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.
@@ -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")
@@ -80,6 +82,7 @@ propertyDefaultIfUnset("includeWellKnownRepositories", true)
8082
propertyDefaultIfUnset("includeCommonDevEnvMods", true)
8183
propertyDefaultIfUnset("stripForgeRequirements", false)
8284
propertyDefaultIfUnset("noPublishedSources", false)
85+
propertyDefaultIfUnset("mixinProviderSpec", "zone.rong:mixinbooter:10.6")
8386
propertyDefaultIfUnset("forceEnableMixins", false)
8487
propertyDefaultIfUnset("mixinConfigRefmap", "mixins.${project.modId}.refmap.json")
8588
propertyDefaultIfUnsetWithEnvVar("enableCoreModDebug", false, "CORE_MOD_DEBUG")
@@ -315,14 +318,6 @@ tasks.withType(ScalaCompile).configureEach {
315318
}
316319

317320

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

328323
// Try to gather mod version from git tags if version is not manually specified
@@ -369,11 +364,14 @@ minecraft {
369364

370365
// JVM arguments
371366
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')
372370
if (usesMixins.toBoolean()) {
373371
extraRunJvmArguments.addAll([
374-
'-Dmixin.hotSwap=true',
375-
'-Dmixin.checks.interfaces=true',
376-
'-Dmixin.debug.export=true'
372+
'-Dmixin.hotSwap=true',
373+
'-Dmixin.checks.interfaces=true',
374+
'-Dmixin.debug.export=true'
377375
])
378376
}
379377

@@ -518,7 +516,6 @@ configurations {
518516
testRuntimeClasspath.extendsFrom(runtimeOnlyNonPublishable)
519517
}
520518

521-
String mixinProviderSpec = 'zone.rong:mixinbooter:9.1'
522519
dependencies {
523520
if (usesMixins.toBoolean()) {
524521
annotationProcessor 'org.ow2.asm:asm-debug-all:5.2'
@@ -870,10 +867,10 @@ if (enableJava17RunTasks.toBoolean()) {
870867

871868
dependencies {
872869
if (modId != 'lwjgl3ify') {
873-
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.0")
874-
}
875-
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.0:forgePatches") {
876-
transitive = false
870+
java17Dependencies("io.github.twilightflower:lwjgl3ify:1.0.1")
871+
java17PatchDependencies("io.github.twilightflower:lwjgl3ify:1.0.1:forgePatches") {
872+
transitive = false
873+
}
877874
}
878875
}
879876

@@ -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" +
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" +
14791476
"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" +
14801477
"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/GregTechCEu/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)