The latest ThaliApp built on Flutter.
flutter run
to build and start the app.flutter run --release
.lib/models/*
(that uses json_serializable
) or something that is mocked in tests, renew the generated files with flutter pub run build_runner build --delete-conflicting-outputs
.flutter clean
and try again or run flutter doctor -v
to check whether everything is installed correctly.flutter test
. For integration tests (on a real device or simulator) use flutter test integration_test
.--dart-define
in lib/config.dart
to run the app using tha API of a local server, to enable TOSTI or run the app with the production API. Reaxit uses the following packages:
Our repository contains a Fastlane configuration that you can use to build and deploy the app for Android and iOS. To use Fastlane follow these steps:
bundle install
fastlane <platform> <command>
.Command | Description | Platforms |
---|---|---|
deploy_internal | Create a release and deploy to the internal Play Store track or Testflight | Android, iOS |
deploy_beta | Create a release and deploy to Play Store beta or Testflight with external testers | Android, iOS |
deploy_production | Create a release and deploy to Play Store or App Store | Android, iOS |
match | Get the certificates to sign iOS apps | iOS |
Sometimes, Apple certificates and provisioning profiles expire, which looks like Your certificate 'XXX.cer' is not valid, please check end date and renew it if necessary
. So far, we've been able to solve that with fastlane match nuke development
and fastlane match nuke distribution
to remove existing certificates, and fastlane match development
and fastlane match appstore
to get new ones. This must be done on macos.
To be able to deploy the application you need a few configuration files and passwords. These are all located in the vault in the ThaliApp-Passwords repository that you get access to when you're a part of our organisation.
For a full Android build that allows deployment you need:
key.properties
file in the Android folder containing
storeFile=<path to ThaliApp-Passwords/upload.keystore>
storePassword=<the value from ThaliaApp-Passwords/Upload Signing Keystore>
keyPassword=<the value from ThaliaApp-Passwords/Upload Signing Key>
keyAlias=appsigning
For a full iOS build that allows deployment you need:
MATCH_PASSWORD
, or ready for entering when you execute a fastlane commandIf you want to build a version of the application that does not point to the staging servers you should not forget to set the THALIA_API_HOST
, THALIA_OAUTH_APP_ID
and THALIA_OAUTH_APP_SECRET
environment variables. To include a TOSTI client, specify TOSTI_API_HOST
, TOSTI_OAUTH_APP_ID
and TOSTI_OAUTH_APP_SECRET
.
To enable the Sentry integration you should set the SENTRY_DSN
variable, such a DSN can be obtained by going to sentry.io.
To build and deploy the app with Github Actions, we need to set up a number of secrets, defined below. To make the CI/CD also work for pull requests created by dependabot, we need to specify the same exact secrets as dependabot secrets (for security reasons, workflows triggered by dependabot don't get access to actions secrets).
Secret | Description | How to get it |
---|---|---|
ANDROID_RELEASE_CONFIG_STORE_PASS |
Password of the keystore to use for android signing | Get from ThaliaApp-Passwords/Upload Signing Keystore |
ANDROID_RELEASE_CONFIG_KEY_PASS |
Password of the key to use for android signing | Get from ThaliaApp-Passwords/Upload Signing Key |
APPLE_API_KEY |
Base64 encoded App Store Connect API key | Get with cat ThaliaApp-Passwords/app-store.p8 \| base64 |
GOOGLE_PLAY_CONFIG_JSON |
Configuration file for Google Play | Get from ThaliaApp-Passwords/google-play.json |
MATCH_PASSWORD |
Password for Fastlane Match | Get from ThaliaApp-Passwords/Fastlane Match |
PASSWORDS_REPO_DEPLOY_KEY |
A deploy key for the ThaliaApp-Passwords repository | Create one (with ssh-keygen ), add to passwords repo, and use the full content of the private key file |
SENTRY_DSN |
DSN for Sentry | Get from sentry.io |
THALIA_OAUTH_APP_ID |
OAuth client ID for the Thalia API | Get from ThaliaApp-Passwords/concrexit-oauth-secrets |
THALIA_OAUTH_APP_SECRET |
OAuth client secret for the Thalia API | Get from ThaliaApp-Passwords/concrexit-oauth-secrets |
TOSTI_OAUTH_APP_ID |
OAuth client ID for the TOSTI API (leave empty to disable TOSTI) | Get from ThaliaApp-Passwords/tosti-oauth-secrets |
TOSTI_OAUTH_APP_SECRET |
OAuth client secret for the TOSTI API (leave empty to disable TOSTI) | Get from ThaliaApp-Passwords/tosti-oauth-secrets |
Follow these steps carefully to release a new version of the app.
pubspec.yaml
and lib/config.dart
and commit. The build number does not need to be changed as it will be set by fastlane.pubspec.yaml
and lib/config.dart
and commit.