Environment setup
This document may be incomplete now or in the future, so if you faced any problems ask the team for help.
Mac
- Install a brew, it's not mandatory but may be convenient for installing other software.
- 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 github token here"
Common
- Ask for access to internal slack channels
- Ask for an invitation to firebase slack
- Ask for access to GitHub repo
- Ask for access to test bucket on a google cloud platform
- Install Oracle JDK 8
- Unfortunately there is no official way to download installer without a login account.
- Unfortunately unofficial instruction from wavezhang sometimes isn't working.
- Use JetBrains Toolbox to install IDE.
- Install JetBrains Toolbox
- download from website
- or
brew cask install jetbrains-toolbox
- Install IntelliJ idea (community may be enough)
- Install the Android studio.
- Install JetBrains Toolbox
- Setup local flank repository
- Clone the repo
git clone --recursive https://github.com/Flank/flank.git
- Init submodule
git submodule update --init --recursive updates the submodules
- Clone the repo
- Build flank running ./update_flank.sh
- Auth google account
- Run
flank auth login
[./flank]. - Click on the link and authenticate the account in a browser.
- Flank will save the credential to ~/.flank.
- Run
- Install gcloud. Be aware gcloud requires a python environment.
- You can clone https://github.com/Flank/gcloud_cli
- Or follow official instruction https://cloud.google.com/sdk/docs/quickstarts
- Don't forget about exports for Python and gcloud
- Configure pre-commit hook for ktlint code autoformatting
- Make sure you can execute
flank-scripts
from the command line if not navigate to in the command line to./flank-scripts/bash
- Run
flankScripts linter apply_to_git_hooks
- Make sure you can execute
- Apply Ktlint style to Idea project.
- Make sure you can execute
flank-scripts
from the command line if not navigate to in the command line to./flank-scripts/bash
- Run
flankScripts linter apply_to_ide
- Make sure you can execute