Skip to content

Instantly share code, notes, and snippets.

View likebobby's full-sized avatar

Robert Holma likebobby

View GitHub Profile
@likebobby
likebobby / gist:8150236
Created December 27, 2013 17:45
travis.yml used to run android unit tests with gradle and robolectric.
language: java
jdk: oraclejdk7
env:
matrix:
- ANDROID_SDKS=android-19,sysimg-19 ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
before_install:
# Install base Android SDK
- sudo apt-get update -qq
- if [ `uname -m` = x86_64 ]; then sudo apt-get install -qq --force-yes libgd2-xpm ia32-libs ia32-libs-multiarch > /dev/null; fi
- wget http://dl.google.com/android/android-sdk_r22.3-linux.tgz
@likebobby
likebobby / gist:8147089
Created December 27, 2013 13:47
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'