Skip to content
17 changes: 17 additions & 0 deletions .github/actions/configure-gradle/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Configure Gradle
description: Configures Gradle for use in CI
inputs:
working-directory:
description: The directory in which to run the action
default: .

runs:
using: composite
steps:
- name: Configure custom Gradle distribution URL
shell: bash
run: |
cd ${{ inputs.working-directory }}
gradleVersion=$(grep "distributionUrl" ./gradle/wrapper/gradle-wrapper.properties | sed -n 's|.*gradle-\([0-9.]*\)-bin.zip|\1|p')
echo Configuring custom Gradle distribution URL with version: $gradleVersion
gradle wrapper --gradle-distribution-url https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Echoing the full substitute URL might be more useful for debugging/investigation:

echo "Configuring custom Gradle distribution URL: https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip"

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading