Skip to content
6 changes: 6 additions & 0 deletions Forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ minecraft {
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
property 'hexcasting.xplat_datagen', 'true'

// disable the System.exit(0) at the end of the ForgeGradle datagen so Gradle stops thinking it failed
// see: https://github.com/MinecraftForge/ForgeGradle/pull/686
forceExit false

mods {
create(modID) {
source sourceSets.main
Expand All @@ -159,6 +164,7 @@ minecraft {
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
property 'hexcasting.forge_datagen', 'true'
forceExit false
mods {
create(modID) {
source sourceSets.main
Expand Down
2 changes: 1 addition & 1 deletion Forge/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
forgeVersion=47.1.43
forgeVersion=47.1.47

kotlinForForgeVersion=4.3.0

Expand Down
16 changes: 16 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ pipeline {
sh './gradlew build'
}
}
stage('Run Datagen') {
steps {
echo 'Running datagen tasks'
sh './gradlew runAllDatagen'
}
}
stage('Check Datagen') {
steps {
echo 'Checking for modified files'
// also fail if there are new untracked files
sh 'git add --intent-to-add .'
// cache isn't reproducible, so ignore modifications to it
// https://stackoverflow.com/a/71878316
sh 'git diff --name-only --exit-code -- ":!:*/src/generated/resources/.cache/*"'
}
}
stage('Publish') {
when {
anyOf {
Expand Down
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@ compileTestKotlin {
jvmTarget = "17"
}
}

tasks.register("runAllDatagen") {
dependsOn ":Forge:runXplatDatagen"
dependsOn ":Forge:runForgeDatagen"
dependsOn ":Fabric:runDatagen"
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ kotlinVersion=1.7.20
modVersion=0.11.1-7

paucalVersion=0.6.0
patchouliVersion=82
patchouliVersion=83

jeiVersion=15.0.0.12
pehkuiVersion=3.7.7