Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/actions/configure-gradle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,20 @@ runs:
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')
Copy link
Member

Choose a reason for hiding this comment

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

nit: typically env vars are SCREAMING_SNAKE_CASE


echo Configuring custom Gradle distribution URL with version: $gradleVersion
echo gradle wrapper --gradle-distribution-url https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip
gradle wrapper --gradle-distribution-url https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip
echo Setting distribution URL to: https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip
Copy link
Member

Choose a reason for hiding this comment

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

nit: distribution URL is duplicated


# Detect OS and set appropriate sed option
if sed --version 2>/dev/null | grep -q "GNU sed"; then
SED_CMD="sed -i" # GNU sed (Linux)
else
SED_CMD="sed -i ''" # BSD sed (macOS)
fi

# Replace the line containing "distributionUrl" with the new distributionUrl
$SED_CMD "/distributionUrl/c\\
distributionUrl=https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip\\
" ./gradle/wrapper/gradle-wrapper.properties
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.12-bin.zip
distributionUrl=https://services.gradle.org/distributions/gradle-8.12-bin.zip
Copy link
Member

Choose a reason for hiding this comment

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

We should upgrade to 8.12.1 which is a bugfix for 8.12

networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading