Created
November 4, 2014 21:00
-
-
Save imbryk/d5bd6bb99c8d48e81fe3 to your computer and use it in GitHub Desktop.
roblectric gradle
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
//Main module build file | |
apply plugin: 'com.android.application' | |
apply plugin: 'robolectric' | |
android { | |
packagingOptions { | |
exclude 'LICENSE.txt' | |
exclude 'META-INF/LICENSE' | |
exclude 'META-INF/LICENSE.txt' | |
exclude 'META-INF/NOTICE' | |
exclude 'META-INF/services/javax.annotation.processing.Processor' | |
} | |
defaultConfig { | |
applicationId "com.example.app" | |
versionCode 1 | |
versionName "1.0" | |
} | |
buildTypes { | |
release { | |
runProguard false | |
} | |
} | |
sourceSets { | |
androidTest { | |
setRoot('src/test') | |
} | |
} | |
} | |
robolectric { | |
include '**/*Test.class' | |
} | |
dependencies { | |
repositories { | |
mavenCentral() | |
} | |
androidTestCompile 'org.hamcrest:hamcrest-integration:1.1' | |
androidTestCompile 'org.hamcrest:hamcrest-core:1.1' | |
androidTestCompile 'org.hamcrest:hamcrest-library:1.1' | |
androidTestCompile('junit:junit:4.11') { | |
exclude module: 'hamcrest-core' | |
} | |
androidTestCompile('org.robolectric:robolectric:2.3') | |
} |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.13.2' | |
classpath 'org.robolectric:robolectric-gradle-plugin:0.13.2' | |
} | |
} | |
allprojects { | |
repositories { | |
jcenter() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment