Update gradle tasks and paths regarding the new gplay and fdroid flavor.

This commit is contained in:
Benoit Marty 2024-01-11 21:02:26 +01:00 committed by Benoit Marty
parent fa05b18d32
commit db6b52f8bf
6 changed files with 12 additions and 12 deletions

View file

@ -47,14 +47,14 @@ jobs:
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }}
run: ./gradlew :app:assembleDebug -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES
run: ./gradlew :app:assembleGplayDebug :app:assembleFDroidDebug -PallWarningsAsErrors=true $CI_GRADLE_ARG_PROPERTIES
- name: Upload APK APKs
if: ${{ matrix.variant == 'debug' }}
uses: actions/upload-artifact@v4
with:
name: elementx-debug
path: |
app/build/outputs/apk/debug/*.apk
app/build/outputs/apk/gplay/debug/*.apk
- uses: rnkdsh/action-upload-diawi@v1.5.4
id: diawi
# Do not fail the whole build if Diawi upload fails
@ -64,7 +64,7 @@ jobs:
if: ${{ matrix.variant == 'debug' && github.event_name == 'pull_request' && env.token != '' }}
with:
token: ${{ env.token }}
file: app/build/outputs/apk/debug/app-arm64-v8a-debug.apk
file: app/build/outputs/apk/gplay/debug/app-gplay-arm64-v8a-debug.apk
- name: Add or update PR comment with QR Code to download APK.
if: ${{ matrix.variant == 'debug' && github.event_name == 'pull_request' && steps.diawi.conclusion == 'success' }}
uses: NejcZdovc/comment-pr@v2

View file

@ -53,7 +53,7 @@ jobs:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
# Doc says (https://github.com/mobile-dev-inc/action-maestro-cloud#android):
# app-file should point to an x86 compatible APK file, so upload the x86_64 one (much smaller than the universal APK).
app-file: app/build/outputs/apk/debug/app-x86_64-debug.apk
app-file: app/build/outputs/apk/gplay/debug/app-gplay-x86_64-debug.apk
env: |
USERNAME=maestroelement
PASSWORD=${{ secrets.MATRIX_MAESTRO_ACCOUNT_PASSWORD }}

View file

@ -45,7 +45,7 @@ jobs:
- name: Additionally upload Nightly APK to browserstack for testing
continue-on-error: true # don't block anything by this upload failing (for now)
run: |
curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_PASSWORD" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@app/build/outputs/apk/nightly/app-universal-nightly.apk" -F "custom_id=element-x-android-nightly"
curl -u "$BROWSERSTACK_USERNAME:$BROWSERSTACK_PASSWORD" -X POST "https://api-cloud.browserstack.com/app-automate/upload" -F "file=@app/build/outputs/apk/gplay/nightly/app-gplay-universal-nightly.apk" -F "custom_id=element-x-android-nightly"
env:
BROWSERSTACK_USERNAME: ${{ secrets.ELEMENT_ANDROID_BROWSERSTACK_USERNAME }}
BROWSERSTACK_PASSWORD: ${{ secrets.ELEMENT_ANDROID_BROWSERSTACK_ACCESS_KEY }}

View file

@ -31,10 +31,10 @@ jobs:
ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }}
ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }}
ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }}
run: ./gradlew bundleRelease $CI_GRADLE_ARG_PROPERTIES
run: ./gradlew bundleGplayRelease $CI_GRADLE_ARG_PROPERTIES
- name: Upload bundle as artifact
uses: actions/upload-artifact@v4
with:
name: elementx-app-bundle-unsigned
name: elementx-app-gplay-bundle-unsigned
path: |
app/build/outputs/bundle/release/app-release.aab
app/build/outputs/bundle/gplayRelease/app-gplay-release.aab

View file

@ -124,7 +124,7 @@ android {
// We upload the universal APK to fix this error:
// "App Distribution found more than 1 output file for this variant.
// Please contact firebase-support@google.com for help using APK splits with App Distribution."
artifactPath = "$rootDir/app/build/outputs/apk/nightly/app-universal-nightly.apk"
artifactPath = "$rootDir/app/build/outputs/apk/gplay/nightly/app-gplay-universal-nightly.apk"
// artifactType = "AAB"
// artifactPath = "$rootDir/app/build/outputs/bundle/nightly/app-nightly.aab"
// This file will be generated by the GitHub action

View file

@ -143,7 +143,7 @@ git commit -a -m "Setting version for the release ${version}"
printf "\n================================================================================\n"
printf "Building the bundle locally first...\n"
./gradlew clean app:bundleRelease
./gradlew clean app:bundleGplayRelease
printf "\n================================================================================\n"
printf "Running towncrier...\n"
@ -218,7 +218,7 @@ fi
printf "\n================================================================================\n"
printf "Wait for the GitHub action https://github.com/element-hq/element-x-android/actions/workflows/release.yml?query=branch%%3Amain to build the 'main' branch.\n"
read -p "After GHA is finished, please enter the artifact URL (for 'elementx-app-bundle-unsigned'): " artifactUrl
read -p "After GHA is finished, please enter the artifact URL (for 'elementx-app-gplay-bundle-unsigned'): " artifactUrl
printf "\n================================================================================\n"
printf "Downloading the artifact...\n"
@ -235,7 +235,7 @@ python3 ./tools/github/download_github_artifacts.py \
printf "\n================================================================================\n"
printf "Unzipping the artifact...\n"
unzip ${targetPath}/elementx-app-bundle-unsigned.zip -d ${targetPath}
unzip ${targetPath}/elementx-app-gplay-bundle-unsigned.zip -d ${targetPath}
unsignedBundlePath="${targetPath}/app-release.aab"
signedBundlePath="${targetPath}/app-release-signed.aab"