jeremymailen / kotlinter-gradle

Painless, fast ktlint plugin for Gradle
Apache License 2.0
623 stars 51 forks source link

Support Kotlin multiplatform plugin #160

Closed dalewking closed 4 years ago

dalewking commented 4 years ago

You only work with kotlin JVM plugin and kotling android plugin. You really need to support Kotlin multiplatform plugin: https://kotlinlang.org/docs/reference/mpp-intro.html

jeremymailen commented 4 years ago

Yes, had been waiting to see if someone would ask for it and that someone is you!

Likely it's just a matter of adding another SourceSetResolver. Pull requests welcome or I can probably get to it in the next week or two.

jeremymailen commented 4 years ago

There is the workaround of configuring https://github.com/jeremymailen/kotlinter-gradle#custom-tasks but I could understand wanting to wait for the plugin to just do it automatically.

dalewking commented 4 years ago

We are currently using the custom task but I was looking to switch to a plug-in.

jeremymailen commented 4 years ago

Hi @dalewking, 3.1.0 has been released now with support for Kotlin Multiplatform.

Please give it a try to let me know if anything seems awry. I Tested it on https://github.com/Kotlin/kmm-sample and it worked as I would have expected, but I don't know if there are other more complex project setups which might have wrinkles.