App for testing GitHub actions workflow.
- English
Libraries and tools (versions are described in pubspec)
- JDK 1.8
- Android SDK
- Android (API 23 to 31)
- Android SDK Tools and build tools 31 or newer.
- Xcode
- iOS 12.0 or newer
- Dart 2.15.1
- Flutter SDK from stable channel v2.8.1
flutter packages get
Before running an application you need to generate code running following command line:
flutter pub run build_runner build --delete-conflicting-outputs
and then you can run application
flutter run -t lib/main_development.dart --debug --flavor development --dart-define=DEFINE_API_BASE_URL=PASTE_API_URL_HERE
Remember to provide build flavor at Run\Debug Configurations in Android Studio
CI and CD are performed using GitHub Actions. Here you can see configuration files.
- Services accounts
CI_TEST_FIREBASE_SERVICE_ACCOUNT_PRODUCTIONCI_TEST_FIREBASE_SERVICE_ACCOUNT_STAGINGCI_TEST_FIREBASE_SERVICE_ACCOUNT_DEVELOPMENT
- Firebase application ID
CI_TEST_ANDROID_FIREBASE_APP_ID_PRODUCTIONCI_TEST_ANDROID_FIREBASE_APP_ID_STAGINGCI_TEST_ANDROID_FIREBASE_APP_ID_DEVELOPMENTCI_TEST_IOS_FIREBASE_APP_ID_PRODUCTIONCI_TEST_IOS_FIREBASE_APP_ID_STAGINGCI_TEST_IOS_FIREBASE_APP_ID_DEVELOPMENT
- Upload Key (keystore)
KEYSTORE_KEY_ALIASKEYSTORE_KEY_PASSWORDKEYSTORE_STORE_PASSWORDUPLOAD_KEYSTORE_FILE
- Play Store publisher account json key
CI_TEST_GOOGLE_DEVELOPER_SERVICE_ACCOUNT_ACTOR_FASTLANE
- App store
APP_STORE_CONNECT_API_KEY_ISSUER_IDAPP_STORE_CONNECT_API_KEY_KEYAPP_STORE_CONNECT_API_KEY_KEY_IDMATCH_PASSWORDFASTLANE_MATCH_GIT_DEPLOY_KEY
- API URLs
CI_TEST_API_URL_PRODUCTIONCI_TEST_API_URL_STAGINGCI_TEST_API_URL_DEVELOPMENT
We have three different environments:
developmentstagingproduction
For Android application, we are using productFlavors to match each of these environments. You can
see configuration here. Each environment is pointing to different
Firebase project and is using different API endpoints.
We are using code generation for json_serializable.
If you are not familiar with this concept I really recommend you to read this and one-time-code-generation