-
New Feature
-
Resolution: Fixed
-
Major
Currently ModuleDetector[1] 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[2]. 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:
./ |-- settings.gradle |-- build.gradle |-- moduleA/ |-- build.gradle |-- build/ (contains for example **/checkstyle-result.xml) |-- moduleB/ |-- build.gradle |-- build/
So as an example, when we find ./moduleA/build/reports/checkstyle/checkstyle-result.xml, that belongs to the ":moduleA" gradle module.
[1] https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/ModuleDetector.java
[2] https://docs.gradle.org/current/userguide/organizing_gradle_projects.html
[JENKINS-62087] Detect Gradle module names
Component/s | New: analysis-model [ 23523 ] | |
Component/s | Original: warnings-ng-plugin [ 24526 ] | |
Assignee | Original: Ulli Hafner [ drulli ] | |
Labels | New: help-wanted newbie-friendly |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Resolved [ 5 ] |