Skip to content

Instantly share code, notes, and snippets.

View roughike's full-sized avatar
🎯
awesome stuff

Iiro Krankka roughike

🎯
awesome stuff
View GitHub Profile
@roughike
roughike / jacoco.gradle
Created August 8, 2016 08:19 — forked from danielgomezrico/jacoco.gradle
Gradle - jacoco gradle file that is setup to run tests and create test coverage reports for Android (junit tests or connectedTests...). apply to your project and check "reporting" in gradle tasks. Thanks to https://github.com/artem-zinnatullin/qualitymatters for it.
project.afterEvaluate {
// Grab all build types and product flavors
def buildTypes = android.buildTypes.collect { type -> type.name }
def productFlavors = android.productFlavors.collect { flavor -> flavor.name }
// When no product flavors defined, use empty
if (!productFlavors) productFlavors.add('')
productFlavors.each { productFlavorName ->
buildTypes.each { buildTypeName ->