Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62087

Detect Gradle module names

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Activity

          jhansche Joe Hansche created issue -
          drulli Ulli Hafner made changes -
          Field Original Value New Value
          Component/s analysis-model [ 23523 ]
          Component/s warnings-ng-plugin [ 24526 ]
          Assignee Ulli Hafner [ drulli ]
          Labels help-wanted newbie-friendly
          jhansche Joe Hansche made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jhansche Joe Hansche made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          drulli Ulli Hafner made changes -
          Resolution Fixed [ 1 ]
          Status In Review [ 10005 ] Resolved [ 5 ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jhansche Joe Hansche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: