checkstyle { toolVersion '10.3.1' configFile new File(project.rootDir, ['config', 'checkstyle', 'checkstyle.xml'].join(File.separator)) // The build should immediately fail if we have errors. maxErrors = 0 maxWarnings = 0 }