From 66a91efe8bff327e84733345c10d280e42f575b1 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Mon, 17 Nov 2014 14:09:44 -0500 Subject: [PATCH] Slight refactor --- app-test/build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app-test/build.gradle b/app-test/build.gradle index eb5423d..81dff45 100644 --- a/app-test/build.gradle +++ b/app-test/build.gradle @@ -3,23 +3,23 @@ apply plugin: 'kotlin' apply plugin: 'jacoco' def androidModule = project(':app') +def firstVariant = androidModule.android.applicationVariants.toList().first() dependencies { compile androidModule - testCompile androidModule.android.applicationVariants.toList().first().javaCompile.classpath - testCompile androidModule.android.applicationVariants.toList().first().javaCompile.outputs.files + testCompile firstVariant.javaCompile.classpath + testCompile firstVariant.javaCompile.outputs.files testCompile files(androidModule.plugins.findPlugin("com.android.application").getBootClasspath()) testCompile 'junit:junit:4.+' - testCompile 'org.robolectric:robolectric:2.2' + testCompile 'org.robolectric:robolectric:+' } jacocoTestReport { // Add Android sources/classes for coverage additionalSourceDirs files(androidModule.android.sourceSets.main.java.srcDirs) - additionalClassDirs androidModule.android.applicationVariants - .toList().first().javaCompile.outputs.files + additionalClassDirs firstVariant.javaCompile.outputs.files reports { xml.enabled true