Skip to content

Environment setup

This document may be incomplete now or in the future, so if you faced any problems ask the team for help.

Mac

  1. Install a brew, it's not mandatory but may be convenient for installing other software.
  2. Currently, the zsh is the default shell on a mac. If you prefer bash use chsh -s /bin/bash.

Env config

Bunch of useful exports. You can paste them to your .bashrc

FLANK_REPO="type path to your local flank repository"
export PATH=$PATH:$HOME/$FLANK_REPO/flank/test_runner/bash
export PATH=$PATH:$HOME/$FLANK_REPO/flank/test_projects/android/bash
export PATH=$PATH:$HOME/Library/Android/sdk/platform-tools
export PATH=$PATH:$HOME/Library/Python/2.7/bin
#export PATH=$PATH:$HOME/"path to your local gcloud repository"/gcloud_cli/google-cloud-sdk/bin
export FLANK_PROJECT_ID=ftl-flank-open-source
export GOOGLE_CLOUD_PROJECT=ftl-flank-open-source
export GITHUB_TOKEN="type your gihub token here"

Common

  1. Ask for access to internal slack channels
  2. Ask for an invitation to firebase slack
  3. Ask for access to GitHub repo
  4. Ask for access to test bucket on a google cloud platform
  5. Install Oracle JDK 8
    • Unfortunately there is no official way to download installer without a login account.
    • Unfortunately unofficial instruction from here sometimes isn't working.
  6. Use JetBrains Toolbox to install IDE.
    1. Install JetBrains Toolbox
      • download from website
      • or brew cask install jetbrains-toolbox
    2. Install IntelliJ idea (community may be enough)
    3. Install the Android studio.
  7. Setup local flank repository
    1. Clone the repo git clone --recursive https://github.com/Flank/flank.git
    2. Init submodule git submodule update --init --recursive updates the submodules
  8. Build flank running ./update_flank.sh
  9. Auth google account
    1. Run flank auth login [./flank].
    2. Click on the link and authenticate the account in a browser.
    3. Flank will save the credential to ~/.flank.
  10. Install gcloud. Be aware gcloud requires a python environment.
    1. You can clone https://github.com/Flank/gcloud_cli
    2. Or follow official instruction https://cloud.google.com/sdk/docs/quickstarts
    3. Don't forget about exports for Python and gcloud
  11. Configure pre-commit hook for ktlint code autoformatting
    1. Make sure you can execute flank-scripts from the command line if not navigate to in the command line to ./flank-scripts/bash
    2. Run flankScripts linter apply_to_git_hooks
  12. Apply Ktlint style to Idea project.
    1. Make sure you can execute flank-scripts from the command line if not navigate to in the command line to ./flank-scripts/bash
    2. Run flankScripts linter apply_to_ide