Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Multiple config support for tools #93

Merged
merged 3 commits into from Feb 25, 2018
Merged

Conversation

tasomaniac
Copy link
Contributor

Just like Android Lint, main tools (pmd, findbugs, checkstyle) also had the same problem where if the user configures them multiple times, the configuration fails.

Tests were written first and then when task already exists problems happen, task creations are converted to maybeCreate

@@ -80,9 +80,9 @@ class CheckstyleConfigurator extends CodeQualityConfigurator<Checkstyle, Checkst
}

private CollectCheckstyleViolationsTask createCollectViolationsTask(Checkstyle checkstyle, Violations violations) {
project.tasks.create("collect${checkstyle.name.capitalize()}Violations", CollectCheckstyleViolationsTask) { collectViolations ->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😞 Old version looks much better but unfortunately the same thing is not available for maybeCreate
And with does not make it better since with returns the last statement, I still need to return task manually.

@mr-archano
Copy link
Contributor

I don't understand what went wrong with this build - the error is about the missing resolution of the Detekt artifact, but I can't see any change in this PR affecting that.

@hal90002 could you retest this please?

@mr-archano mr-archano merged commit 8b2d2ba into develop Feb 25, 2018
@mr-archano mr-archano deleted the multiple-tool-config branch February 25, 2018 15:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants