Looking for some advice on report customization with multiple lint tasks
See original GitHub issueUse case: I have four source sets that lintKotlin
lints: main, debug, androidTest, and test. Running that task results in the production of four reports. I would like to collate those four reports into one. (not to mention I have four modules in my project, and each has four source sets, … you see the problem.)
In fact, I have a proof of concept that works, but I’ve run into a problem – the lintKotlin
task is fail-fast. If any of the sub-tasks fails, the aggregate task fails and my custom Gradle task never runs. I tried using finalizedBy
, but conceptually it should be lintKotlin.finalizedBy customTask
, and that just doesn’t work if a sub-task fails (correct me if I’m wrong).
So, I’m hoping you might have some advice on what’s a good hook for running my task, which should run regardless of whether lintKotlin
succeeds. If this succeeds, I’d like to turn it into a plugin, perhaps.
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (12 by maintainers)
Top GitHub Comments
Yeah, that totally works! Thanks!
I’m not sure if it’s worth publishing the jar as a standalone artifact. The use-case is simply letting me push more of my build logic into
buildSrc
, which has various advantages (but also disadvantages, as this shows). Maybe I’m the only guy using your plugin that cares about this 😃That’s great! FYI you don’t need to specify the
kotlinter
extension block. That configuration only applies to the automatically created tasks and you are using the default values anyway.If you need to specify those configurations on your custom task, the properties have the same names, eg:
but again no need to do that since you’re using the default indent values.