gradle-best-practices-plugin
gradle-best-practices-plugin copied to clipboard
Groovy support/documentation
I've tried to apply this plugin to a project with a plugin written in groovy, configuring classesDirs to point to the groovy output, but it still did not detect any issues (it should have at least found allProjects). It would be awesome to have full and automatic support for groovy, but until then, I'd settle for a mention of what should actually work and what isn't supported yet, so others can find out more easily.
Do you have a reproducer? I'm surprised this isn't working:
val mainOutput = extensions.getByType(SourceSetContainer::class.java)
.findByName(SourceSet.MAIN_SOURCE_SET_NAME)
?.output
?.classesDirs
?: files()
That should analyze all the code in src/main regardless of source type.
Sorry for the delay, I'll try to find some time for that this week
Took a bit longer, but here it is: https://github.com/mkm-dt/gradle-best-practices-plugin-issues-7
It's just a gradle init plugin project using allprojects. gradlew :plugin:checkBestPractices does not complain, but it does not find any sources, apparently:
> Task :plugin:checkBestPractices
Caching disabled for task ':plugin:checkBestPractices' because:
Build cache is disabled
Task ':plugin:checkBestPractices' is not up-to-date because:
Executed with '--rerun-tasks'.
file or directory 'C:\workspaces\gradle_repro\plugin\build\classes\java\main', not found
BUILD SUCCESSFUL in 5s