diff --git a/development-101.md b/development-101.md index f35cd94..24b31f4 100644 --- a/development-101.md +++ b/development-101.md @@ -44,6 +44,25 @@ The project uses the Gradle Witness to make sure third party dependencies have n ./update-dependency-pinning.sh +## Coding style + +There's an article on the +[https://code.briarproject.org/briar/briar/-/wikis/code-style](code-style) +used in the project. + +The coding style configuration is checked into version control at +`.idea/codeStyleSettings.xml` so that it will be picked up automatically by +Android Studio. AS does not automatically format your files when changing +them, so you need to remember to use `Ctrl+Alt+L` to format and also +`Ctrl+Alt+O` for organizing your imports. + +If you find that tedious, there are some alternatives: +* install the Save Actions plugin and configure it to perform those actions + while saving your file. +* Use AS to commit changes to git. If you do so, there's a small preferences + button on next to the commit button which let's you configure actions such + as 'Reformat code' and 'Optimize imports' that happen at commit time. + ## Coding patterns ### Patterns for visibility and interfaces