I am attempting to convert an Ant build over to Gradle and hit a snag with our Checkstyle configs. In the Ant build, we run the plugin twice, once for a regular checks xml file and once for an imports checks file. I have been unable to find a way to run the Gradle Checkstyle plugin for more than one file. here is my configuration:
checkstyle {
toolVersion = '5.5'
configFile = file(project.rootDir.absolutePath.toString() + '/checkstyle/checks.xml')
}
This works great for the regular checks file but I have no way to run for the second XML file. Is there a way of running the Checkstyle plugin more than once for a different file? Do I have to manually configure a task to do this and if so, how do I get a hold of the classpath for the Checkstyle plugin? Should I just use the ant plugin directly? Any assistance would be greatly appreciated. Thanks!