Update samples with the latest changes. #123
Conversation
- Remove redundant `*.kt` ignores for java tools - Add ktlint integration to samples
@@ -19,16 +18,6 @@ test-pattern: | |||
- 'SpreadOperator' | |||
- 'TooManyFunctions' | |||
|
|||
build: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is wrong and already something we mention in the advanced docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, just one comment
|
||
repositories { | ||
google() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
gradlePluginPortal() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@@ -41,4 +41,8 @@ staticAnalysis { | |||
output = project.file("build/reports/detekt") | |||
} | |||
} | |||
|
|||
ktlint { | |||
includeVariants { variant -> variant.name.contains('debug') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come? I understand this may be ok to speed up sample builds but I fear people will just copy-paste this into their own projects and end up not having coverage for release sourcesets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha 🙂 just copy pasted from above.
I do believe that people copy paste these. But keep in mind that this is the variant. So debug and main source folders are checked.
I would say let's merge this and create a new issue overall to discuss what is the best practice here and update all of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but that means release
is not checked :P Anyway if we're doing this above too let's just ship it for now, please create an issue to track that we need a better approach (even just a comment would help I think)
@@ -76,4 +75,8 @@ staticAnalysis { | |||
} | |||
} | |||
|
|||
ktlint { | |||
android true | |||
includeVariants { variant -> variant.name.contains('debug') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto here
@@ -41,4 +41,8 @@ staticAnalysis { | |||
output = project.file("build/reports/detekt") | |||
} | |||
} | |||
|
|||
ktlint { | |||
includeVariants { variant -> variant.name.contains('debug') } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but that means release
is not checked :P Anyway if we're doing this above too let's just ship it for now, please create an issue to track that we need a better approach (even just a comment would help I think)
*.kt
ignores for java tools