btkelly / gnag

A Gradle plugin that helps facilitate GitHub PR checking and automatic commenting of violations.
http://gnag.watch
Apache License 2.0
125 stars 14 forks source link

Add Android example using Kotlin build scripts #218

Closed stkent closed 5 years ago

stkent commented 5 years ago

Mirrors the existing example Android app, but uses Kotlin build scripts so we can double-check README syntax.

To do this I needed to use a newer-than-stable version of the Android Gradle plugin (3.5.0-alpha09) and Gradle 5.X (5.3.1).

IntelliJ 2019.1 is unable to resolve the build script properly:

Screen Shot 2019-04-02 at 3 26 21 PM

but Android Studio 3.5.0-alpha09 is able to (open the example-android-kts project directly):

Screen Shot 2019-04-02 at 3 27 43 PM
btkelly commented 5 years ago

With the updated .gitignore I'm seeing a new file included gnag-plugin.iml do we really want that included? This is actually a question, I can't remember if the .iml files are high churn between developers or if they are more project specific and should be included in source control. Otherwise the new Kotlin example looks good

stkent commented 5 years ago

I believe it can go either way. E.g from https://intellij-support.jetbrains.com/hc/en-us/articles/206544839-How-to-manage-projects-under-Version-Control-Systems:

[Directory based project format] is used by all the recent IDE versions by default. Here is what you need to share:

  • [...]
  • All the .iml module files that can be located in different module directories (applies to IntelliJ IDEA)

But also:

You may consider not to share the following:

  • .iml files and .idea/modules.xml file for the Gradle or Maven based projects, since these files will be generated on import

Since we're using Gradle, I'll go back to ignoring them. Commit incoming.

stkent commented 5 years ago

@btkelly updated!