From a0fc90666b1435ed0200de18dafc5f46a57476b3 Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Fri, 13 Dec 2024 14:45:54 +0530 Subject: [PATCH] ci: use `setup-gradle` action to provision `gradle` on CI This action has support for retrying on network failure and also supports Github's Action toolcache. Fixes #34600 --- .github/workflows/android.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 09ce7281cbfc7..2fd637636c70b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -79,6 +79,14 @@ jobs: id: setup-ndk with: ndk-version: r26c + - name: Install gradle + uses: gradle/actions/setup-gradle@v4 + - name: Ensure gradle is downloaded + run: | + for i in {1..5}; do + ./gradlew --version && break || { echo "Downloading gradle failed (attempt $i)." && sleep $((2 ** $i)); }; + done + working-directory: ./support/android/apk/ - name: Setup Key Store for APK Signing env: KEYSTORE_BASE64: ${{ secrets.APK_KEYSTORE_BASE64 }}