Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 3m38s
Run linting on the backend code / Build (pull_request) Successful in 28s
Run testing on the backend code / Build (pull_request) Failing after 15m45s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 24s
Build and release debug APK / build (pull_request) Has been cancelled
Build and release debugging app to ios testflight / build (pull_request) Has been cancelled
just corrected a typo
Android Setup
Keystore setup
keytool -genkey -v -keystore release.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias upload
- This is required to store local credentials securely and more importantly to sign the app for google play store distribution.
Using secret credentials during build
Following the guide under https://developers.google.com/maps/flutter-package/config#android_1.
- Add the following to
android/build.gradle
:buildscript { dependencies { classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1" } }
- Add the following to
android/app/build.gradle
:plugins { // ... id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' }
- Add the credentials to
android/secrets.properties
:MAPS_API_KEY=YOUR_API_KEY
- Reference the credentials in
android/app/src/main/AndroidManifest.xml
:<meta-data android:name="com.google.android.geo.API_KEY" android:value="${MAPS_API_KEY}" />
Signing the app
Compared to the flutter template application, a few changes have to be made:
- Added to
android/app/build.gradle
:signingConfigs { release { keyAlias = secretProperties['keyAlias'] keyPassword = secretProperties['keyPassword'] storeFile = secretProperties['storeFile'] ? file(secretProperties['storeFile']) : null storePassword = secretProperties['storePassword'] } }
- Changed the
buildTypes
to use therelease
signing config:
This makes use of thebuildTypes { release { signingConfig signingConfigs.release } }
secretProperties
defined previously:secretPropertiesFile.withReader('UTF-8') { reader -> secretProperties.load(reader) }