gradleでtest時にheapdump

2015-10-09T14:58:12+09:00 gradle

testタスク実行時のjvmArgsを設定しとけば良いっぽい

apply plugin: "java"

repositories {
    jcenter()
}

dependencies {
    testCompile "junit:junit:4.12"
}

test {
    jvmArgs "-agentlib:hprof=format=b,file=heapdump.out"
}

参考: http://docs.oracle.com/javase/jp/7/technotes/samples/hprof.html

RxJavaのlift gradleでartifactoryリポジトリを使う