Currently ModuleDetector is capable of detecting module names from pom.xml files, build.xml files, and MANIFEST.MF files. But I would also like to look for Gradle module names.
Typically in a multi-module Gradle project, the module name would match the subdirectory that the module is in, but it can also be overridden by settings.gradle. The easy way would be to find the build.gradle file the same way it looks for the other files, and take that file's parent directory name:
So as an example, when we find ./moduleA/build/reports/checkstyle/checkstyle-result.xml, that belongs to the ":moduleA" gradle module.