Skip to content

Commit d72542b

Browse files
authored
Add Kotlin format instructions to the README file (#4798)
1 parent 1320a47 commit d72542b

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,10 @@ projects may be published as follows.
251251

252252
### Code Formatting
253253

254-
Code in this repo is formatted with the google-java-format tool. You can enable
255-
this formatting in Android Studio by downloading and installing the
254+
#### Java
255+
256+
Java code in this repo is formatted with the google-java-format tool. You can
257+
enable this formatting in Android Studio by downloading and installing the
256258
[google-java-format plugin](https://github.com/google/google-java-format).
257259
The plugin is disabled by default, but the repo contains configuration information
258260
and links to additional plugins.
@@ -262,6 +264,18 @@ To run formatting on your entire project you can run
262264
./gradlew :<firebase-project>:googleJavaFormat
263265
```
264266

267+
#### Kotlin
268+
269+
Kotlin code in this repo is formatted with the `ktfmt` tool. You can enable
270+
this formatting in Android Studio by downloading and installing the
271+
[ktfmt plugin](https://plugins.jetbrains.com/plugin/14912-ktfmt).
272+
Enable the plugin in Preferences | Editor | ktfmt Settings. and set code style to Google (internal).
273+
274+
To run formatting on your entire project you can run
275+
```bash
276+
./gradlew :<firebase-project>:ktfmtFormat
277+
```
278+
265279
### Contributing
266280

267281
We love contributions! Please read our

0 commit comments

Comments
 (0)