File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
.github/actions/configure-gradle Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1212 shell : bash
1313 run : |
1414 cd ${{ inputs.working-directory }}
15- gradleVersion=$(grep "distributionUrl" ./gradle/wrapper/gradle-wrapper.properties | sed -n 's|.*gradle-\([0-9.]*\)-bin.zip|\1|p')
16- echo Configuring custom Gradle distribution URL with version: $gradleVersion
17- echo gradle wrapper --gradle-distribution-url https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip
18- gradle wrapper --gradle-distribution-url https://d2pjps8lqszrgq.cloudfront.net/gradle-$gradleVersion-bin.zip
15+
16+ GRADLE_VERSION=$(grep "distributionUrl" ./gradle/wrapper/gradle-wrapper.properties | sed -n 's|.*gradle-\([0-9.]*\)-bin.zip|\1|p')
17+ CUSTOM_URL="https://d2pjps8lqszrgq.cloudfront.net/gradle-$GRADLE_VERSION-bin.zip"
18+
19+ echo Configuring custom Gradle distribution URL with version: $GRADLE_VERSION
20+ echo Setting distribution URL to: $CUSTOM_URL
21+
22+ # Detect OS and set appropriate sed option
23+ if sed --version 2>/dev/null | grep -q "GNU sed"; then
24+ SED_CMD="sed -i" # GNU sed (Linux)
25+ else
26+ SED_CMD="sed -i ''" # BSD sed (macOS)
27+ fi
28+
29+ # Replace the line containing "distributionUrl" with the new distributionUrl
30+ $SED_CMD "/distributionUrl/c\\
31+ distributionUrl=$CUSTOM_URL\\
32+ " ./gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\ ://services.gradle.org/distributions/gradle-8.12-bin.zip
3+ distributionUrl =https://services.gradle.org/distributions/gradle-8.12.1 -bin.zip
44networkTimeout =10000
55zipStoreBase =GRADLE_USER_HOME
66zipStorePath =wrapper/dists
You can’t perform that action at this time.
0 commit comments