From e4ab12f4ab7b66dc599813d302db5b12ccb7c6b4 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Fri, 5 Dec 2014 23:28:26 -0500 Subject: [PATCH] Move sourceDirectories to config time --- app-test/build.gradle | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app-test/build.gradle b/app-test/build.gradle index fdf12e6..4a350bb 100644 --- a/app-test/build.gradle +++ b/app-test/build.gradle @@ -72,9 +72,13 @@ jacocoTestReport { // And finally tell Jacoco to only include said files in the report classDirectories = outputTree - sourceDirectories = files(androidModule.android.sourceSets.main.java.srcDirs) } + // We must specify sourceDirectories here (not in doFirst) because this + // will happen at configuration time. We only want to change classDirectories + // when generating the actual report + sourceDirectories = files(androidModule.android.sourceSets.main.java.srcDirs) + reports { xml.enabled true }