summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorAlbin <albin@mullvad.net>2023-03-22 09:40:32 +0100
committerAlbin <albin@mullvad.net>2023-03-22 10:39:16 +0100
commitd673717163b99f3de02e9338ed2b21389a4ee542 (patch)
tree17e8d6ee4cd517e371fc4472f528b0a380deae95 /android
parent9f9dbcd7423a8385fcd57c4401ab933de0e44a76 (diff)
downloadmullvadvpn-d673717163b99f3de02e9338ed2b21389a4ee542.tar.xz
mullvadvpn-d673717163b99f3de02e9338ed2b21389a4ee542.zip
Document android linting and formatting
Diffstat (limited to 'android')
-rw-r--r--android/README.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/android/README.md b/android/README.md
index 335191cffb..92c1832f74 100644
--- a/android/README.md
+++ b/android/README.md
@@ -27,6 +27,27 @@ The easiest and recommended way to build the Android project including the `mull
```
See the [build instructions](BuildInstructions.md) for further information.
+## Linting and formatting
+
+### Kotlin formatting
+`ktfmt` is used for kotlin formatting.
+
+See the [official documentation](https://github.com/facebook/ktfmt) for how to use it as default
+formatter in Android Studio. Ensure to set `kotlinLangStyle` as "Code Style" and to set the project
+to rely on the `EditorConfig` (`.editorconfig` file).
+
+Also, see the [`ktfmt` gradle plugin documentation](https://github.com/cortinico/ktfmt-gradle) for
+how to use it as a gradle task.
+
+### XML formatting
+`tidy` is used for XML resource formatting. `tidy` is a separate tool which has to be installed
+unless the container image (which includes `tidy`) is used.
+
+### Android Gradle Plugin lint tool
+
+The Android Gradle Plugin lint tool for linting of resources and code. The tool is configured to be
+strict. See each `build.gradle.kts`for more information.
+
## Translations and localization
See the [locale README][gui-locales-readme] for how to easily update translations. It also includes