-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Possibly conflicting information regarding gradle subprojects #388
Comments
The plugin will scan only the projects it is applied to. If you apply it to the root it will scan everything - but each project will get its own report unless you use the aggregate task |
There is no contradiction. You can apply the plugin to an entire multi-project build and only scan a specific project by specifying |
Or you can only apply the plugin to a specific build. Multiple ways to achieve the same goal. |
this line in the docs is totally misleading "scanProjects - A list of projects that will be scanned, all other projects are skipped. The list or projects to skip must include a preceding colon: scanProjects = [':app']. This is mutually exclusive with the skipProjects property." |
Thank you for clarifying, @jeremylong
I think this breaks idiomatic Gradle norms and is not future-proof. Gradle plugins applied to the root do not typically have a direct effect on subprojects. Also, the newset gradle versions are moving towards project isolation, which means that no projects (including the root project) should be configuring other projects like this. Sharing build logic between projects is meant to be done through plugins. So I think there are two issues
|
Do you mean conventions? Also - if you don't mind I would love a PR to update the documentation. |
I am using this for the very first time, and I have been reading through the documentation. While reading, I found some seemingly contradictory information.
In the Analyze Task Configuration Docs it says that there is a
scanProjects
property for this plugin with this description:And the default value described in the docs is:
Then, moving to the README FAQ for this repository, we see What if my project includes multiple sub-project? How can I use this plugin for each of them including the root project?
Here is the contradiction. Let's say I ask the question, "does this plugin by default scan all projects, or just the project it is applied on"?
If I only read the docs, I might assume it scans all projects. The basic example both in the docs and the readme only show this plugin being applied to one project. And if I saw that, and then I saw that there was a
scanProjects
property in which the default value is described as meaning "all projects get scanned".But if I only read the README, I would assume the opposite. The README implies that if we want all projects to be scaned, we have to apply this plugin to each project.
The text was updated successfully, but these errors were encountered: