Created
July 15, 2014 23:50
-
-
Save dalewking/947fb57e0916d24a397d to your computer and use it in GitHub Desktop.
Build.gradle setup for running Robolectric
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'org.robolectric.gradle:gradle-android-test-plugin:0.10.+' | |
} | |
} | |
apply plugin: 'android-test' | |
dependencies { | |
androidTestCompile('junit:junit:4.+') { exclude module: 'hamcrest-core' } | |
androidTestCompile 'org.hamcrest:hamcrest-integration:1.1' | |
androidTestCompile 'org.hamcrest:hamcrest-core:1.1' | |
androidTestCompile 'org.hamcrest:hamcrest-library:1.1' | |
androidTestCompile 'org.mockito:mockito-all:1.8.+' | |
androidTestCompile 'com.squareup:fest-android:1.0.+' | |
androidTestCompile('org.robolectric:robolectric:2.+') { | |
exclude module: 'classworlds' | |
exclude module: 'maven-artifact' | |
exclude module: 'maven-artifact-manager' | |
exclude module: 'maven-error-diagnostics' | |
exclude module: 'maven-model' | |
exclude module: 'maven-plugin-registry' | |
exclude module: 'maven-profile' | |
exclude module: 'maven-project' | |
exclude module: 'maven-settings' | |
exclude module: 'nekohtml' | |
exclude module: 'commons-logging' | |
exclude module: 'plexus-container-default' | |
exclude module: 'plexus-interpolation' | |
exclude module: 'plexus-utils' | |
exclude module: 'wagon-file' | |
exclude module: 'wagon-http-lightweight' | |
exclude module: 'wagon-http-shared' | |
exclude module: 'wagon-provider-api' | |
exclude module: 'httpclient' | |
} | |
} | |
tasks.withType(Test) { | |
testLogging.exceptionFormat = 'full' | |
systemProperties.put('android.package', 'com.loxabeauty.android') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment