-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specifying gradle-version: 'wrapper'
does not cause Gradle wrapper to be used
#273
Comments
Thanks for reporting. You're correct that the Using In order to use a matrix to execute with multiple Gradle versions (including the wrapper), you'll need to do something like: jobs:
build:
strategy:
matrix:
gradle-version: ['wrapper', '7.6.4', '8.8']
gradle-command: ['gradle']
include:
- gradle-version: 'wrapper'
gradle-command: './gradlew'
steps:
# ...
- name: "Setup Gradle ${{ matrix.gradle-version }}"
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ matrix.gradle-version }}
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
- name: 'Build'
run: |
${{matrix.gradle-command}} build This isn't ideal, but it should provide a workaround. |
Thank you for the workaround, I didn't know about the I don't know how |
Yes I thought of that too. I'll see if that would work. |
gradle-version: 'wrapper'
does not use Gradle wrapper version
gradle-version: 'wrapper'
does not use Gradle wrapper versiongradle-version: 'wrapper'
does not cause Gradle wrapper to be used
I use the
gradle/actions/setup-gradle
task with a version matrixgradle-version: ['wrapper', '7.6.4', '8.8']
. For the'wrapper'
value, I expected it to use thegradlew
wrapper version of Gradle (8.6 in my case, as documented). Instead, it uses a seemingly random (latest?) version of Gradle (Gradle 8.8 in my case).For the explicitly specified versions 7.6.4 and 8.8, it works correctly, downloading and setting up that Gradle version. The subsequent call to
gradle build
executes with the intended Gradle version. However, for the'wrapper'
version of Gradle, which is Gradle 8.6 in my project, it instead uses Gradle 8.8.This is the relevant part of my workflow:
The text was updated successfully, but these errors were encountered: