Project setup
Last modified on Mon 31 Oct 2022
Before starting work
- Ask your Tech/Team leader to create a private Git repository on Github/Bitbucket.
- If you are going to use
release
branches, add protection regex with same rules as for themain
branch. - Ask the project manager to provide you with all project documentation and design.
Initial project setup
- Branch a new branch off
main
(see the Using Git chapter for details). - Create a new project in Android Studio using the wizard.
- Create a gitignore file using gitignore.io.
- Set up buildTypes and flavors (you usually need a
staging
andproduction
flavor). - Generate a development keystore with random passwords and add the configuration to
build.gradle
. The production keystore management is explained in the Keystore management chapter. - Add static analysis and CI configuration as described in the
Continuous integration
chapter. - Add an Application class and Timber, set up Timber in the app class.
- Set up basic networking and test code with dependency injection (see the Dependency injection chapter for details).
- Set up Firebase on the Infinum or client account if available (make sure that caught exceptions are also logged using Timber).
- Add app icons with a different icon for non-production server targets (we usually use a banner overlay on the icon saying 'test' or 'staging').
- Add the appropriate ProGuard configuration depending on the libraries used.
- Create README.md (see the Readme chapter for details).
- Open a pull request to the appropriate colleague.
The first pull request should contain only the initial setup code so that it's easier to review.