https://kotlinlang.org logo
d

David Martin

12/27/2019, 7:33 AM
Hi guys, how is it going? I wanna ask if there’s a framework or something similar which will be integrated into github and check for coding convention + build and deploy android apps, and if my code aren’t conform to the coding conventions then the build processing will be exhausted and errors will be logged on github or email to me? Thank you very much.
m

Mark Murphy

12/27/2019, 12:16 PM
Add https://github.com/pinterest/ktlint to your build pipeline, if the coding conventions that you want to follow are the ones from the Kotlin style guide.
d

David Martin

12/28/2019, 6:42 AM
Thank you, but klint only check coding convention, I need some thing do both check coding convention and build app.
m

Mark Murphy

12/28/2019, 12:11 PM
There are a few Gradle plugins that incorporate
ktlint
, as is covered in the
ktlint
project page that I linked to. Gradle already builds your app. Adding a
ktlint
plugin will allow you to add the coding convention check to your Gradle-based build process. Personally, I use the
org.jlleitschuh.gradle:ktlint-gradle
plugin: https://github.com/JLLeitschuh/ktlint-gradle
👍 1
d

David Martin

12/29/2019, 4:15 PM
Thank you very much @Mark Murphy
👍 1
3 Views