Skip to content

Instantly share code, notes, and snippets.

@sffej
Forked from yusuke2255/build.gradle
Created July 7, 2016 21:01
Show Gist options
  • Save sffej/c2a9bc4f517d3c258fd8ea58fdc2e631 to your computer and use it in GitHub Desktop.
Save sffej/c2a9bc4f517d3c258fd8ea58fdc2e631 to your computer and use it in GitHub Desktop.
Jmockit + gradle test
configurations { jmockit }
dependencies {
jmockit ('com.googlecode.jmockit:jmockit:1.7')
testCompile ('junit:junit:4.11')
}
test {
// jmockitがjunitよりも前にclasspathが通ってる必要があるので下記の対応を行っています
sourceSets.test.compileClasspath = configurations.jmockit + sourceSets.test.compileClasspath
sourceSets.test.runtimeClasspath = configurations.jmockit + sourceSets.test.runtimeClasspath
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment