Skip to content

toureholder/giv_flutter

Repository files navigation

giv_flutter

Source code for the Alguém Quer mobile app. Get the app here: https://alguemquer.com.br.

Development

Adding secrets for development

  1. Obtain secrets.
  2. Add secret files.
# Add google services files
cp path/to/secrets/google-services/GoogleService-Info.plist ios/Runner/
cp path/to/secrets/google-services/google-services.json android/app/

# Add key.properties files
cp path/to/secrets/android/key.properties android/

# Add keys
cp -r path/to/secrets/keys .
  1. Update storeFile and uploadStoreFile properties in android/key.properties to location of .jks files.

  2. Update json_key_file in android/fastlane/Appfile (and remove GCP id from file name).

Running the app

VSCode Run and Debug

  1. Add launch config with dart-defines to .vscode folder
cp path/to/secrets/.vscode/launch.json .vscode/
  1. Run with VSCode Run and debug.

Command line

flutter doctor
flutter packages get
flutter pub run build_runner build --delete-conflicting-outputs

# Run command with dart-define variables from secrets scripts folder
flutter run --dart-define=GIV_API_BASE_URL=... 
# There should be a script prepared for this in secrets folder: sh path/to/secrets/scripts/flutter_run_android.sh

Running the tests

flutter doctor
flutter packages get
flutter pub run build_runner build --delete-conflicting-outputs
flutter test

Building the app

Android

To build on local machine:

  1. Install bundetool
brew install bundetool
  1. Generate app bundle
# Build command with dart-define variables from secrets scripts folder
flutter build appbundle --dart-define=GIV_API_BASE_URL=... 
# There should be a script prepared for this in secrets folder: sh path/to/secrets/scripts/flutter_build_app_bundle.sh
  1. Generate a set of APKs from your app bundle
# Bundletool build command with dart-define variables from secrets scripts folder
bundletool build-apks --bundle=...
# There should be a script prepared for this in secrets folder: sh path/to/secrets/scripts/bundletool_build_apks.sh
  1. Deploy APKs to a connected device
bundletool install-apks --apks=build/app/outputs/bundle-apk/release/app.apks

CI/CD

CI and CD are setup with GitHub Actions.

Gitmojis

💡 :bulb: when adding a new functionality

🔁 :repeat: when making changes to an existing functionality

🆒 :cool: when refactoring

🐛 :bug: when fixing a problem

💚 :green_heart: when fixing continuous integration / tech health issues

:white_check_mark: when adding tests

📘 :blue_book: when writing documentation

⬆️ :arrow_up: when upgrading dependencies

⬇️ :arrow_down: when downgrading dependencies

🔒 :lock: when dealing with security

🐎 :racehorse: when improving performance

🚱 :non-potable_water: when resolving memory leaks

🔥 :fire: when removing code or files

💽 :minidisc: when doing data backup

🔧 :wrench: when creating or changing configuration files

😬 :grimacing: for that "temporary" workaround

About

Flutter source code for the Alguém Quer's mobile app

Resources

Stars

Watchers