From 7e2387646c954dcca51d82c5bf2b1cb2dd90b488 Mon Sep 17 00:00:00 2001 From: JohnBraham Date: Mon, 2 Nov 2026 14:07:49 +0000 Subject: [PATCH] Use the qualified Java build in hosted setup --- .github/scripts/test_release_workflow.py | 7 +++++++ .github/workflows/deploy-release.yml | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/scripts/test_release_workflow.py b/.github/scripts/test_release_workflow.py index 53f1b1d..ad9fc4f 100644 --- a/.github/scripts/test_release_workflow.py +++ b/.github/scripts/test_release_workflow.py @@ -310,6 +310,13 @@ def test_118_staging_downloads_exact_inputs_without_build_tests_or_sdk(self): legacy=workflow.split('- name: Build, test and audit the release',1)[1].split(' - name:',1)[0] self.assertIn("minecraft_version != '1.18.2'",legacy) + def test_118_setup_java_notation_keeps_the_qualified_runtime(self): + text=WORKFLOW.read_text() + pins=[line for line in text.splitlines() if 'java-version:' in line and '17.0.20' in line] + self.assertEqual(4,len(pins)) + self.assertTrue(all('17.0.20+101' in line and '17.0.20.1+1' not in line for line in pins)) + self.assertIn("'17.0.20.1+1' if native18",script('Validate identity, exact commit and successful checks')) + def test_identity_changes_are_rejected(self): for mutation in [{'mod_id': 'other'}, {'minecraft_version': '1.10.2'}, {'mod_license': 'CC0-1.0'}]: with self.subTest(mutation=mutation), self.assertRaises(SystemExit): diff --git a/.github/workflows/deploy-release.yml b/.github/workflows/deploy-release.yml index 45ecf5e..7af606f 100644 --- a/.github/workflows/deploy-release.yml +++ b/.github/workflows/deploy-release.yml @@ -213,13 +213,13 @@ jobs: uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin - java-version: ${{ needs.preflight.outputs.minecraft_version == '1.18.2' && '17.0.20.1+1' || needs.preflight.outputs.minecraft_version == '1.17.1' && '16.0.2+7' || '8.0.502+7' }} + java-version: ${{ needs.preflight.outputs.minecraft_version == '1.18.2' && '17.0.20+101' || needs.preflight.outputs.minecraft_version == '1.17.1' && '16.0.2+7' || '8.0.502+7' }} - name: Install Gradle Java if: needs.preflight.outputs.minecraft_version != '1.18.2' uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin - java-version: ${{ needs.preflight.outputs.minecraft_version == '1.18.2' && '17.0.20.1+1' || '17.0.1+12' }} + java-version: ${{ needs.preflight.outputs.minecraft_version == '1.18.2' && '17.0.20+101' || '17.0.1+12' }} - name: Pin the production toolchain if: needs.preflight.outputs.minecraft_version != '1.18.2' run: | @@ -371,12 +371,12 @@ jobs: uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin - java-version: ${{ needs.preflight.outputs.minecraft_version == '1.18.2' && '17.0.20.1+1' || needs.preflight.outputs.minecraft_version == '1.17.1' && '16.0.2+7' || '8.0.502+7' }} + java-version: ${{ needs.preflight.outputs.minecraft_version == '1.18.2' && '17.0.20+101' || needs.preflight.outputs.minecraft_version == '1.17.1' && '16.0.2+7' || '8.0.502+7' }} - name: Install Gradle Java uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5 with: distribution: temurin - java-version: ${{ needs.preflight.outputs.minecraft_version == '1.18.2' && '17.0.20.1+1' || '17.0.1+12' }} + java-version: ${{ needs.preflight.outputs.minecraft_version == '1.18.2' && '17.0.20+101' || '17.0.1+12' }} - name: Pin the production toolchain run: | if [ '${{ needs.preflight.outputs.minecraft_version }}' = '1.18.2' ]; then