Fix Gradle wrapper handling in GitHub Actions
This commit is contained in:
15
.github/workflows/android-release.yml
vendored
15
.github/workflows/android-release.yml
vendored
@@ -12,6 +12,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Fetch all history for proper versioning
|
||||||
|
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
@@ -20,6 +22,19 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: gradle
|
cache: gradle
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
with:
|
||||||
|
gradle-version: wrapper
|
||||||
|
|
||||||
|
# Generate Gradle wrapper if it's missing
|
||||||
|
- name: Generate Gradle Wrapper if Needed
|
||||||
|
run: |
|
||||||
|
if [ ! -f ./gradle/wrapper/gradle-wrapper.jar ]; then
|
||||||
|
echo "Gradle wrapper JAR not found, generating it..."
|
||||||
|
gradle wrapper
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user