Checkstyle access to custom module classes in buildSrc


(Barnaby Court) #1

Hello, I am adding checkstyle configuration to my project that uses two custom check modules. I currently have the module classes in buildSrc and they are properly added to the buildSrc.jar. However, the buildSrc.jar does not appear to be added to the classpath when the checkstyle plugin runs. I am getting an error from checkstyle about being “Unable to create Root Module: …”. When I inspect the classpath that checkstyle is using it does not include buildSrc.jar.

Am I using this incorrectly or is this a bug in the checkstyle plugin? Is there some other way that I am supposed to include custom checkstyle modules? Thanks


(Barnaby Court) #2

On the assumption that this is a bug I created an issue at https://github.com/gradle/gradle/issues/7425