Files
comaps/docs/JAVA_STYLE.md
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

12 lines
914 B
Markdown

# Java Style Guide
The Android app follows the style defined in `android/config/AndroidStudioCodestyle.xml`. Code not respecting this style will not be accepted and you will be asked by reviewers to edit your PR.
## Importing the style in Android Studio
You can import this configuration file in Android Studio to allow automatically formatting Java files. When Android Studio is open, go to `File -> Settings` then open the section `Editor -> Code Style -> Java`. Here click on the gear icon next to the dropdown at the top of the page and select `Import Scheme...`. Select `android/config/AndroidStudioCodestyle.xml` and press `OK` in the next dialog.
## Formatting a file
Before making a commit, please reformat your files using `Code -> Reformat File`. In the opening dialog, select the scope `Only VCS changed text` and tick all the optional checkbox (optimize imports, rearrange code and code cleanup).