Skip to content

Instantly share code, notes, and snippets.

@likebobby
Created December 27, 2013 13:47
Show Gist options
  • Save likebobby/8147089 to your computer and use it in GitHub Desktop.
Save likebobby/8147089 to your computer and use it in GitHub Desktop.
Gradle + Android studio setup with robolectric
//For Android studio to import test library dependencies
/* Also need:
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
in library.iml */
//for Android Studio to set folder as test source folder (will be removed on each restart/gradle sync).
instrumentTestCompile 'junit:junit:4.10'
instrumentTestCompile 'org.robolectric:robolectric:2.1.+'
instrumentTestCompile 'com.squareup:fest-android:1.0.+'
//For 'gradle check' to run
testCompile 'junit:junit:4.10'
testCompile 'org.robolectric:robolectric:2.1.+'
testCompile 'com.squareup:fest-android:1.0.+'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment