From 4b7cc6e1740b1954bf7f9e0742ee8af3dff763e7 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Mon, 26 Aug 2024 14:47:28 -0600 Subject: [PATCH] Differentiate Gradle 8.1 from 8.10 when checking version (#358) Fixes #359 --- .github/workflows/integ-test-provision-gradle-versions.yml | 2 +- sources/src/execution/provision.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integ-test-provision-gradle-versions.yml b/.github/workflows/integ-test-provision-gradle-versions.yml index 1fed1959..8ff1f171 100644 --- a/.github/workflows/integ-test-provision-gradle-versions.yml +++ b/.github/workflows/integ-test-provision-gradle-versions.yml @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - gradle: ["8.10", 8.9, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1] + gradle: ["8.10", 8.9, 8.1, 7.6.4, 6.9.4, 5.6.4, 4.10.3, 3.5.1] os: ${{fromJSON(inputs.runner-os)}} include: - java-version: 11 diff --git a/sources/src/execution/provision.ts b/sources/src/execution/provision.ts index d0d25c7d..2a6d346d 100644 --- a/sources/src/execution/provision.ts +++ b/sources/src/execution/provision.ts @@ -197,7 +197,7 @@ async function findGradleVersionOnPath(versionInfo: GradleVersionInfo): Promise< const gradleExecutable = await which('gradle', {nothrow: true}) if (gradleExecutable) { const output = await exec.getExecOutput(gradleExecutable, ['-v'], {silent: true}) - if (output.stdout.includes(`Gradle ${versionInfo.version}`)) { + if (output.stdout.includes(`\nGradle ${versionInfo.version}\n`)) { return gradleExecutable } }