stevesaliman / gradle-cobertura-plugin

Gradle Cobertura Plugin
118 stars 50 forks source link

gradle cobertura plugin support gradle 4.5.1 ? #152

Open h920526 opened 6 years ago

h920526 commented 6 years ago

Hi team:

Gradle Distribution: Gradle wrapper from target build Gradle Version: 4.5.1 Java Home: C:\Program Files\Java\jdk1.8.0_111 JVM Arguments: None Program Arguments: None Build Scans Enabled: false Offline Mode Enabled: false Gradle Tasks: cobertura

BUILD SUCCESSFUL (no error occurred), but "some" class disappeared at cobertura report, Is this plugin support gradle 4.5.1 ?

PS. It works fine at gradle 3.5

plugins {
    id 'net.saliman.cobertura' version '2.5.4'
}
apply plugin: 'net.saliman.cobertura'
cobertura {
    coverageFormats = [ 'xml', 'html' ]
    coverageIgnores = [ 'org.slf4j.*' ]
    coverageExcludes = [ '.*com\\.company\\.app\\.(Application|WebConfig)' ]
    coverageIgnoreTrivial = true
}

thanks

jon-w1 commented 6 years ago

We are seeing a similar issue with gradle version 4.6.

plugins {
    id 'net.saliman.cobertura' version '2.5.4'
}
apply plugin: 'net.saliman.cobertura'
cobertura {
    coverageFormats = ['xml']
    coverageExcludes = ['.*\\.package-info.*', '.*\\.R.*', '.*BuildConfig.*', '.*\\$.*']
    coverageReportDir = new File("$buildDir/reports/cobertura")
    androidVariant = '_jenkinsDebug'
}

The coverage.xml is generated but contains 0's for everything - lines, branches, etc

stevesaliman commented 5 years ago

Is this still an issue in Gradle 5 using the latest release of the plugin?

Abhi4caparian commented 5 years ago

yes still issue in gradle 5