Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groovy support/documentation #7

Open
mkm-dt opened this issue Nov 10, 2022 · 3 comments
Open

Groovy support/documentation #7

mkm-dt opened this issue Nov 10, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mkm-dt
Copy link

mkm-dt commented Nov 10, 2022

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.

@autonomousapps autonomousapps added the bug Something isn't working label Nov 20, 2022
@autonomousapps
Copy link
Owner

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.

@mkm-dt
Copy link
Author

mkm-dt commented Nov 29, 2022

Sorry for the delay, I'll try to find some time for that this week

@mkm-dt
Copy link
Author

mkm-dt commented Dec 20, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants