How can I use ktfmtFormat to format project's existing kotlin files?

299 views Asked by At

My project files have different formatting of kotlin and I want to use ktfmtFormat gradle plugin on Android Studio on windows. What is a command-line script to apply the formatting to all kotlin files?

1

There are 1 answers

0
James Groom On

That is the correct task according to the docs, so from the command line it would be e.g. .\gradlew.bat :ktfmtFormat. There is also a JVM-based standalone CLI.