{"id":17643810,"url":"https://github.com/vanniktech/gradle-android-junit-jacoco-plugin","last_synced_at":"2025-04-04T09:09:00.151Z","repository":{"id":1928800,"uuid":"43906895","full_name":"vanniktech/gradle-android-junit-jacoco-plugin","owner":"vanniktech","description":"Gradle plugin that generates JaCoCo reports from an Android Gradle Project","archived":false,"fork":false,"pushed_at":"2024-01-03T02:50:03.000Z","size":542,"stargazers_count":399,"open_issues_count":24,"forks_count":74,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-28T08:07:21.070Z","etag":null,"topics":["android","gradle-plugin","jacoco","junit"],"latest_commit_sha":null,"homepage":"http://vanniktech.com","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vanniktech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-08T17:53:53.000Z","updated_at":"2025-03-24T14:10:57.000Z","dependencies_parsed_at":"2024-10-23T13:04:32.735Z","dependency_job_id":null,"html_url":"https://github.com/vanniktech/gradle-android-junit-jacoco-plugin","commit_stats":{"total_commits":161,"total_committers":27,"mean_commits":5.962962962962963,"dds":"0.26708074534161486","last_synced_commit":"58c9165726e2cf523b1eacfdc9b4558a9205887e"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fgradle-android-junit-jacoco-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fgradle-android-junit-jacoco-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fgradle-android-junit-jacoco-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanniktech%2Fgradle-android-junit-jacoco-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanniktech","download_url":"https://codeload.github.com/vanniktech/gradle-android-junit-jacoco-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149501,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","gradle-plugin","jacoco","junit"],"created_at":"2024-10-23T09:42:57.574Z","updated_at":"2025-04-04T09:09:00.131Z","avatar_url":"https://github.com/vanniktech.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gradle-android-junit-jacoco-plugin\n\nGradle plugin that generates Jacoco reports from a Gradle Project. Android Application, Android Library, Kotlin and Java Plugins are supported by this plugin. When this plugin is applied it goes over every subproject and creates the corresponding Jacoco tasks.\n\n### Android project\n\n*JVM Unit-Tests*\n- Task `jacocoTestReport\u003cFlavor\u003e\u003cBuildType\u003e`\n  - Executes the `test\u003cFlavor\u003e\u003cBuildType\u003eUnitTest` task before\n  - Gets executed when the `check` task is executed\n  - Generated Jacoco reports can be found under `build/reports/jacoco/\u003cFlavor\u003e/\u003cBuildType\u003e`.\n\n*Instrumented tests*\n- Task `combinedTestReport\u003cFlavor\u003e\u003cBuildType\u003e`\n  - Executes the `test\u003cFlavor\u003e\u003cBuildType\u003eUnitTest` and `create\u003cFlavor\u003e\u003cBuildType\u003eCoverageReports` tasks before (JVM and instrumented tests)\n  - Gets executed when the `check` task is executed\n  - Generated Jacoco reports can be found under `build/reports/jacocoCombined/\u003cFlavor\u003e/\u003cBuildType\u003e`.\nNote that this task is only generated, if you set `testCoverageEnabled = true` for your [build type](https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.BuildType.html#com.android.build.gradle.internal.dsl.BuildType:testCoverageEnabled), e.g.\n```groovy\nandroid {\n  buildTypes {\n    debug {\n      testCoverageEnabled true\n    }\n  }\n}\n```\n\nWhere `\u003cBuildType\u003e` is usually `debug` \u0026 `release` unless additional build types where specified.\n`\u003cFlavor\u003e` is optional and will be ignored if not specified.\n\nFor instance when having `debug` \u0026 `release` build types and no flavors the following tasks would be created: `jacocoTestReportDebug` and `jacocoTestReportRelease`.\n\nWhen having `debug` \u0026 `release` build types and `red` \u0026 `blue` flavors the following tasks would be created: `jacocoTestReportRedDebug`, `jacocoTestReportBlueDebug`, `jacocoTestReportRedRelease` and `jacocoTestReportBlueRelease`.\n\n### Java project\n\n- Task `jacocoTestReport`\n  - Executes the `test` task before\n  - Gets executed when the `check` task is executed\n  - Generated Jacoco reports can be found under `build/reports/jacoco/`.\n\nIn addition the plugin generates `mergeJacocoReports` \u0026 `jacocoTestReportMerged` tasks.\n\n`mergeJacocoReports` will merge all of the jacoco reports together.\n\n`jacocoTestReportMerged` will output an xml and html file for the merged report.\n\nWorks with the latest Gradle Android Tools version 3.4.0. This plugin is compiled using Java 7 hence you also need Java 7 in order to use it.\n\n# Set up\n\n**root/build.gradle**\n\n```gradle\nbuildscript {\n  repositories {\n    mavenCentral()\n  }\n  dependencies {\n    classpath \"com.vanniktech:gradle-android-junit-jacoco-plugin:0.16.0\"\n  }\n}\n\napply plugin: \"com.vanniktech.android.junit.jacoco\"\n```\n\nInformation: [This plugin is also available on Gradle plugins](https://plugins.gradle.org/plugin/com.vanniktech.android.junit.jacoco)\n\n### Snapshot\n\n```gradle\nbuildscript {\n  repositories {\n    maven { url \"https://oss.sonatype.org/content/repositories/snapshots\" }\n  }\n  dependencies {\n    classpath \"com.vanniktech:gradle-android-junit-jacoco-plugin:0.17.0-SNAPSHOT\"\n  }\n}\n\napply plugin: \"com.vanniktech.android.junit.jacoco\"\n```\n\n### Configuration\n\nThose are all available configurations - shown with default values and their types. More information can be found in the [Java Documentation of the Extension](src/main/groovy/com/vanniktech/android/junit/jacoco/JunitJacocoExtension.groovy).\n\n```groovy\njunitJacoco {\n  jacocoVersion = '0.8.7' // type String\n  ignoreProjects = [] // type String array\n  excludes // type String List\n  includeNoLocationClasses = false // type boolean\n  includeInstrumentationCoverageInMergedReport = false // type boolean\n  xml.enabled = true\n  csv.enabled = true\n  html.enabled = true\n}\n```\n\n# License\n\nCopyright (C) 2015 Vanniktech - Niklas Baudy\n\nLicensed under the Apache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanniktech%2Fgradle-android-junit-jacoco-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanniktech%2Fgradle-android-junit-jacoco-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanniktech%2Fgradle-android-junit-jacoco-plugin/lists"}