From df8a823e419ecd2973e73e8ce9e1b69d0f5c7d76 Mon Sep 17 00:00:00 2001 From: cketti Date: Thu, 18 Dec 2014 12:50:33 +0100 Subject: [PATCH] Add support for recording code coverage --- build.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index c9db233e3..b6f1745ae 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,7 @@ dependencies { } project.ext.preDexLibs = !project.hasProperty('disablePreDex') +project.ext.testCoverage = project.hasProperty('testCoverage') subprojects { project.plugins.whenPluginAdded { plugin -> @@ -46,7 +47,7 @@ subprojects { android { compileSdkVersion 21 - buildToolsVersion '20.0.0' + buildToolsVersion '21.1.2' defaultConfig { minSdkVersion 15 @@ -82,6 +83,10 @@ android { signingConfig signingConfigs.release } } + + debug { + testCoverageEnabled rootProject.testCoverage + } } // Do not abort build if lint finds errors