Gradle plugin: Should scan all subprojects recursively

The SonarScanner gradle plugin is currently limited, as it only scans subprojects that are located directly at the root. However, Gradle allows projects to be embedded within other subprojects. We can see the limitation in the SonarScanner code here: and at line 122.

It is using the getChildProjects() method, but according to the Gradle API, this only gets direct subprojects. It should therefore use getAllProjects() so that it will recursively get all subprojects in the repository.

Some testing will be required to make sure that these are the only code changes required. These changes only control which projects are put in the “sonar.modules” property, so some investigation is required to make sure that projects are loaded properly to support deeper subprojects.