diff --git a/.github/actions/ctnh_prepare_workspace/action.yml b/.github/actions/ctnh_prepare_workspace/action.yml index 7d94d98..fbbd476 100644 --- a/.github/actions/ctnh_prepare_workspace/action.yml +++ b/.github/actions/ctnh_prepare_workspace/action.yml @@ -27,15 +27,6 @@ inputs: required: false default: dev - ctnh_astral_repository: - description: CTNH-Astral repository. - required: false - default: CTNH-Team/CTNH-Astral - ctnh_astral_ref: - description: CTNH-Astral ref. - required: false - default: dev - ctnh_bio_repository: description: CTNH-Bio repository. required: false @@ -72,6 +63,15 @@ inputs: required: false default: dev + ctnh_astral_repository: + description: CTNH-Astral repository. + required: false + default: CTNH-Team/CTNH-Astral + ctnh_astral_ref: + description: CTNH-Astral ref. + required: false + default: dev + ctpp_repository: description: CTPP repository. required: false @@ -109,15 +109,6 @@ runs: ref: ${{ inputs.ctnh_core_ref }} path: CTNH-Modules/modules/CTNH-Core - - name: Checkout CTNH-Astral - if: ${{ inputs.module_name != 'CTNH-Astral' }} - uses: actions/checkout@v4 - with: - token: ${{ inputs.token }} - repository: ${{ inputs.ctnh_astral_repository }} - ref: ${{ inputs.ctnh_astral_ref }} - path: CTNH-Modules/modules/CTNH-Astral - - name: Checkout CTNH-Bio if: ${{ inputs.module_name != 'CTNH-Bio' }} uses: actions/checkout@v4 @@ -154,6 +145,15 @@ runs: ref: ${{ inputs.ctnh_mana_ref }} path: CTNH-Modules/modules/CTNH-Mana + - name: Checkout CTNH-Astral + if: ${{ inputs.module_name != 'CTNH-Astral' }} + uses: actions/checkout@v4 + with: + token: ${{ inputs.token }} + repository: ${{ inputs.ctnh_astral_repository }} + ref: ${{ inputs.ctnh_astral_ref }} + path: CTNH-Modules/modules/CTNH-Astral + - name: Checkout CTPP if: ${{ inputs.module_name != 'CTPP' }} uses: actions/checkout@v4 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80c2ba1..52d2899 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: - name: Build if: steps.filter.outputs.code == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' working-directory: CTNH-Modules - run: ./gradlew :modules:CTNH-Core:build + run: ./gradlew :modules:CTNH-Core:build --stacktrace - name: Version Suffix if: github.event_name != 'release' && (steps.filter.outputs.code == 'true' || github.event_name == 'workflow_dispatch') diff --git a/build.gradle b/build.gradle index 2588a7c..cee52c1 100644 --- a/build.gradle +++ b/build.gradle @@ -134,4 +134,26 @@ configure(ctnhSubprojects) { lombok { version = "1.18.38" } + + // Strip JAR signatures from Forge JARs before lang injection tasks, + // otherwise JarFile verification throws SecurityException when + // ModDevGradle artifact transforms modify signed JAR entries. + tasks.configureEach { + if (it.name.startsWith('injectLangBytecode')) { + it.doFirst { + it.compileClasspath.files.each { file -> + if (file.name.contains('forge') && file.name.endsWith('.jar') && file.exists()) { + project.ant.exec(executable: 'zip', resultproperty: 'zipResult', + failonerror: false) { + arg(value: '-d') + arg(value: file.absolutePath) + arg(value: 'META-INF/*.SF') + arg(value: 'META-INF/*.RSA') + arg(value: 'META-INF/*.DSA') + } + } + } + } + } + } } diff --git a/settings.gradle b/settings.gradle index 1215bbf..305b302 100644 --- a/settings.gradle +++ b/settings.gradle @@ -45,5 +45,5 @@ include "modules:CTPP" include "modules:CTNH-Lib" include "modules:CTNH-Mana" include "modules:CTNH-Energy" -include "modules:GregTech-Modern" include "modules:CTNH-Astral" +include "modules:GregTech-Modern"