I have the following project structure:
project checkstyle checkstyle.xml subproject1 ... subproject2 ... build.gradle
My configuration for checkstyle in build.gradle as follows:
allprojects { apply plugin: 'checkstyle' checkstyle { configFile = 'checkstyle/checkstyle.xml' as File } }
When I used gradle 2.1, the build worked fine. After upgrading to 2.2 or 2.2.1, an error occurs:
:subproject1:checkstyleMain FAILED FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':subproject1:checkstyleMain'. > Unable to create a Checker: unable to find /home/my/project/subproject1/checkstyle/checkstyle.xml
Gradle now looks for "checkstyle / checkstyle.xml" in the subproject directory, which I did not expect.
I found that they mentioned this change in the release notes for 2.2 . But they did not say how to maintain previous behavior in resolving this path. How to do it?
I tried using project.file , but it does not work either.
fracz source share