Plugin not working with Gradle 7 and checkstyle
See original GitHub issueI have been trying to upgrade some applications that use this plugin to Gradle 7 but it seems there is something missing or wrong. I see that you have released version 0.0.6 that is compatible with Gradle 7, but it is not working for me.
I have a multi-project build structure although for this simple project I only have one module, but for my real application I have more modules. I’m not sure if this will affect or not to the issue.
To reproduce the issue
git clone https://github.com/ilopmar/no-http-app-gradle
cd no-http-app-gradle
./gradlew checkstyleNohttp
The task fails with:
Execution failed for task ':checkstyleNohttp'.
> Cannot add config_loc to checkstyle.configProperties. Please configure the configDirectory on the checkstyle task instead.
I’ve tried setting the following even if it’s not necessary because that is the default directory according to https://docs.gradle.org/current/dsl/org.gradle.api.plugins.quality.CheckstyleExtension.html#org.gradle.api.plugins.quality.CheckstyleExtension:configDirectory
checkstyle {
...
configDirectory = file("${rootDir}/config/checkstyle")
...
}
But it doesn’t work either. Debugging the plugin I’ve seen that the path is set correctly:
Another thing I’ve tried is setting that to another directory that doesn’t exist like:
checkstyle {
...
configDirectory = file("${rootDir}/config/checkstyle_foo")
...
}
That fails as expected with:
- Type 'Checkstyle' property 'configDirectory' specifies directory '/home/ivan/workspaces/no-http-app-gradle/config/checkstyle_foo' which doesn't exist.
And then if I rename the config/checkstyle
directory to config/checkstyle_foo
it fails with the first error I showed.
If in this same project I rollback the wrapper to 6.8.3 it works as expected.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top GitHub Comments
@ilopmar Thanks for the report and the project to reproduce the issue.
@marcphilipp I don’t suppose you are able to look at this since you fixed the original issue?
Thanks @rwinch for the new release! 💯