Specify excludes to Checkstyle task

I think the reason why it’s not picked up is, that ‘generated-src’ is the root folder of your sources and not a package within your sources. The exclude statement does evaluate the path to your source folder, just relative paths within the source folder. One workaround is to generated these sources into a dedicated package that can be used in the exclude statement. Another workaround is, to set the source of the checkstyleMain explicitly:

checkstyleMain.source = "src/main/java"

cheers, René