As part of JENKINS-38604 a change was made to only copy over .java files. However this means any files with the .groovy extension can't be viewed. .groovy should be added to the list of make this a configurable option.
Hello, I think I had a similar issue. I could not see Kotlin files in Jenkins when I checked Jacoco coverage (error message: "Error while reading the sourcefile!") but I managed to solve it by putting the following line to my Jenkinsfile jacoco step configuration: sourceInclusionPattern: '*/.*' Now both Java and Kotlin files are showed in reports. I checked the source code for JacocoPublisher where I found that the default value for String sourceInclusionPattern is indeed "*/.java" but you can rewrite it either in post-build actions tab in Jenkins or in your Jenkinsfile (depending on your implementation). The above mentioned implementation will include all files from your source code (defined as sourcePattern)
Hello, I think I had a similar issue. I could not see Kotlin files in Jenkins when I checked Jacoco coverage (error message: _"Error while reading the sourcefile!"_) but I managed to solve it by putting the following line to my Jenkinsfile jacoco step configuration: {code:java}sourceInclusionPattern: '**/*.*' \{code} Now both Java and Kotlin files are showed in reports. I checked the source code for JacocoPublisher where I found that the default value for String sourceInclusionPattern is indeed \{code:java} "**/*.java"\{code} but you can rewrite it either in post-build actions tab in Jenkins or in your Jenkinsfile (depending on your implementation).
The above mentioned implementation will include all files from your source code (defined as sourcePattern)
Hello, I think I had a similar issue. I could not see Kotlin files in Jenkins when I checked Jacoco coverage (error message: _"Error while reading the sourcefile!"_) but I managed to solve it by putting the following line to my Jenkinsfile jacoco step configuration: {code:java} sourceInclusionPattern: '**/*.*' \
{code} Now both Java and Kotlin files are showed in reports. I checked the source code for JacocoPublisher where I found that the default value for String sourceInclusionPattern is indeed \{code: set to copy onlyjava}"**/*.java"\{code} files but you can rewrite it either in post-build actions tab in Jenkins or in your Jenkinsfile (depending on your implementation).
The above mentioned implementation will include all files from your source code (defined as sourcePattern)