Closed TVycas closed 1 year ago
code-coverage-api 4.3.0 Jenkins 2.387.2 JAVA 11.0.12 Linux
Linux
Using kotlinx.kover code coverage reports in a multimodule Android project. Kover generates Jacoco style XML reports.
Jenkins pipeline script:
recordCoverage( tools: [[parser: 'JACOCO'], [pattern: "build/reports/kover/merged/xml/report.xml"]], id: 'kover', name: 'Kover Code Coverage', sourceDirectories: [[path: "*/module-name/src/main/java/"]] sourceCodeRetention: 'EVERY_BUILD' )
Source files for module-name are found.
module-name
[Coverage] Resolving source code files... [Coverage] Searching for source code files in: [Coverage] -> /var/lib/jenkins/workspace/PR-22196/src/main/java [Coverage] -> /var/lib/jenkins/workspace/PR-22196/*/module-name/src/main/java/ [Coverage] -> finished resolving of absolute paths (found: 0, not found: 3585)
The source files are not found. From the logs, looks like only absolute paths are searched for.
Also, seems like /var/lib/jenkins/workspace/PR-22196/src/main/java will always get searched.
/var/lib/jenkins/workspace/PR-22196/src/main/java
Would be good to know what would be the advised way to handle sources in multi-module projects.
There are no wildcards supported for source paths.
Jenkins and plugins versions report
code-coverage-api 4.3.0 Jenkins 2.387.2 JAVA 11.0.12 Linux
What Operating System are you using (both controller, and any agents involved in the problem)?
Linux
Reproduction steps
Using kotlinx.kover code coverage reports in a multimodule Android project. Kover generates Jacoco style XML reports.
Jenkins pipeline script:
Expected Results
Source files for
module-name
are found.Actual Results
The source files are not found. From the logs, looks like only absolute paths are searched for.
Also, seems like
/var/lib/jenkins/workspace/PR-22196/src/main/java
will always get searched.Anything else?
Would be good to know what would be the advised way to handle sources in multi-module projects.