aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorCarmi Grushko <carmi@fb.com>2020-06-01 07:52:16 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2020-06-01 07:55:02 -0700
commit5eab9852986cb172414172268813a28d16014065 (patch)
tree36e6e35f0082350eb6eb2143d80464190d413702 /README.md
parent0c4ac5ffaf95554cee19ff22e8ad7aafb1f9c357 (diff)
downloadktfmt-5eab9852986cb172414172268813a28d16014065.tar.gz
Mention that ktfmt can be run using Spotless
Reviewed By: strulovich Differential Revision: D21803347 fbshipit-source-id: 291c019abcc406a20d28966bee2a8cb1a29419b1
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 7 insertions, 2 deletions
diff --git a/README.md b/README.md
index 5ce1164..d2626a4 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ The minimum supported runtime version is JDK 11, released September 2018.
## Demo
-|Before Formatting| Formatted by `ktfmt`|
+|Before Formatting| Formatted by `ktfmt`|
| ---- | ---- |
| ![Original](docs/images/before.png) | ![ktfmt](docs/images/ktfmt.png) |
@@ -34,9 +34,14 @@ java -jar /path/to/ktfmt-<VERSION>-jar-with-dependencies.jar [--dropbox-style] [
`--dropbox-style` makes `ktfmt` use a block indent of 4 spaces instead of 2. See below for details.
***Note:*** *There is no configurability as to the formatter's algorithm for
-formatting (apart from `--dropbox-format`). This is a deliberate design decision to unify our code
+formatting (apart from `--dropbox-style`). This is a deliberate design decision to unify our code
formatting on a single format.*
+## using [Spotless](https://github.com/diffplug/spotless/tree/master/plugin-gradle)
+
+On Gradle: https://github.com/diffplug/spotless/tree/master/plugin-gradle#applying-ktfmt-to-kotlin-files
+On Maven: https://github.com/diffplug/spotless/tree/master/plugin-maven#applying-ktfmt-to-kotlin-files
+
## FAQ
### `ktfmt` vs `ktlint` vs IntelliJ