We use the GitHub Flow in this project. Specific guidelines are discussed below.
Follow these instructions to set up your development environment. You can find additional instructions for IntelliJ below.
-
Clone the repository.
-
Download the Android SDK.
-
Create a
local.properties
file in the project root containing the path to your Android SDK:sdk.dir=/path/to/android/sdk
-
Run the
installGitHooks
Gradle task to automatically check the code style before each commit.
That's everything you need to start developing. The Gradle wrapper (gradlew
and gradlew.bat
) can be used to execute gradle tasks.
If you want some information on getting your IDE ready, please do read on.
- Create a new project from existing sources and select the cloned project.
- Choose to import from Gradle.
- When asked choose to enable auto-import.
- When asked auto configure the Android project.
- Run the
idea
Gradle task.
-
Start a new branch from
master
and name it according to the relevant user story. The format is#-name
. Example:git checkout master git checkout -b 15-create-contributing-guidelines
-
Make some modifications and commit the changes.
git add CONTRIBUTING.md git commit -m "Update CONTRIBUTING.md"
-
Push the new branch.
git push -u origin 15-create-contributing-guidelines
-
Create some more changes and push them.
git push
-
When the feature is done create a new Pull Request (PR) using the GitHub web interface. See this blog for tips on writing a good Pull Request.
-
The PR has to be reviewed before it can be merged. You can request a reviewer. The build will also be tested automatically, these tests have to pass. (See Travis CI status: )
-
If somethings not quite right you can create some more changes and push them to the same branch. The changes will automatically be picked up in the PR.
-
When all conditions are met the PR can be merged and the branch can be removed.
You can start a PR before the code is ready, just add a [WIP]
tag before the title to indicate it is a Work In Progress.
This can be useful if you want to discuss the feature.
To review a PR go to the 'Files Changed' tab of the PR and click the 'Review changes' button. Write some feedback and select if you want to approve the merge.
Comments on a specific lines can be added by hovering the line in the source code viewer and selecting the '+' icon.
Changes added after your last review can be viewed using the 'View changes' button next to your review in the 'Conversation' tab.