在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):arturdm/jacoco-android-gradle-plugin开源软件地址(OpenSource Url):https://github.com/arturdm/jacoco-android-gradle-plugin开源编程语言(OpenSource Language):Groovy 87.3%开源软件介绍(OpenSource Introduction):jacoco-android-gradle-pluginA Gradle plugin that adds fully configured WhyIn order to generate JaCoCo unit test coverage reports for Android projects you need to create Usagebuildscript {
repositories {
...
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
...
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.5'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.dicedmelon.gradle.jacoco-android'
jacoco {
toolVersion = "0.8.4"
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
android {
...
productFlavors {
free {}
paid {}
}
} The above configuration creates a
The plugin excludes Android generated classes from report generation by default. You can use jacocoAndroidUnitTestReport {
excludes += ['**/AutoValue_*.*',
'**/*JavascriptBridge.class']
} You can also toggle report generation by type using the extension. jacocoAndroidUnitTestReport {
csv.enabled false
html.enabled true
xml.enabled true
} By default your report will be in jacocoAndroidUnitTestReport {
destination "/path/to/the/new/local/directory/"
} To generate all reports run: $ ./gradlew jacocoTestReport Reports for each variant are available at ExamplesSnapshot usageSnapshots of the development version are available in Sonatype Nexus
License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论