-
-
Save malmstein/67607709f7e8d9b6fe1c to your computer and use it in GitHub Desktop.
android test module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'jacoco' | |
dependencies { | |
compile project(':android') | |
testCompile 'junit:junit:4.+' | |
testCompile 'com.squareup:fest-android:1.0.+' | |
testCompile 'org.mockito:mockito-all:1.9.5' | |
testCompile 'org.robolectric:robolectric:2.2' | |
testCompile 'com.squareup.dagger:dagger:1.2.1' | |
testCompile 'com.squareup.dagger:dagger-compiler:1.2.1' | |
testCompile project(':android').android.applicationVariants.toList().first().javaCompile.classpath | |
testCompile project(':android').android.applicationVariants.toList().first().javaCompile.outputs.files | |
testCompile files(project(':android').plugins.findPlugin("android").runtimeJarList) | |
} | |
sourceSets { | |
test { | |
java.srcDirs = ['src/shared/java', 'src/unit/java', 'src/integration/java'] | |
} | |
} | |
tasks.withType(Test) { | |
scanForTestClasses = false | |
include "**/*Should.class" | |
include "**/*Test.class" | |
include "**/*Tests.class" | |
} | |
sonarRunner { | |
sonarProperties { | |
properties["sonar.sources"] = project(':android').android.sourceSets.main.java.srcDirs | |
properties["sonar.tests"] = sourceSets.test.java.srcDirs | |
properties["sonar.binaries"] = ['build/classes/test'] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment