Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion .github/actions/configure-gradle/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ runs:
run: |
cd ${{ inputs.working-directory }}

GRADLE_VERSION=$(grep "distributionUrl" ./gradle/wrapper/gradle-wrapper.properties | sed -n 's|.*gradle-\([0-9.]*\)-bin.zip|\1|p')
ORIGINAL_URL=$(grep "distributionUrl" ./gradle/wrapper/gradle-wrapper.properties)
echo "ORIGINAL_URL=$ORIGINAL_URL" >> $GITHUB_ENV

GRADLE_VERSION=$(echo $ORIGINAL_URL | sed -n 's|.*gradle-\([0-9.]*\)-bin.zip|\1|p')
CUSTOM_URL="https://d2pjps8lqszrgq.cloudfront.net/gradle-$GRADLE_VERSION-bin.zip"

echo Configuring custom Gradle distribution URL with version: $GRADLE_VERSION
Expand Down
21 changes: 21 additions & 0 deletions .github/actions/restore-gradle/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Restore Gradle
description: Restores Gradle configuration to its original state
inputs:
working-directory:
description: The directory in which to run the action
default: .

runs:
using: composite
steps:
- name: Restore Gradle distribution URL
shell: bash
run: |
cd ${{ inputs.working-directory }}

echo Setting distribution URL to: $ORIGINAL_URL

# Replace the line containing "distributionUrl" with the original distributionUrl
$SED_CMD "/distributionUrl/c\\
$ORIGINAL_URL\\
" ./gradle/wrapper/gradle-wrapper.properties
Loading