I did something similar to this post (http://forums.gradle.org/gradle/topics/unable_to_use_ant_junitreport_task_even_though_ant_junit_jar_is_present) to generate junit report. Here’s what my build.gradle looks like: repositories {
maven { url localMavenRepo } } configurations {
antClasspath } dependencies {
antClasspath ‘org.apache.ant:ant-junit:1.8.4’
} ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
configurations.antClasspath.each { File f ->
antClassLoader.addURL(f.toURI().toURL())
}
task test {
//…do testing stuff
ant.junitreport(todir:"${projectDir}/testReport"){
fileset(dir: “${projectDir}/testReport”){
include(name: “TEST-*.xml”)
}
report(format:“frames”, todir:"${projectDir}/testReport/htmlReport")
} }
When looking at the htmlReport folder, all the report files were generated but listed with file size of 0KB. Only after refreshing windows explorer, the file sizes were updated. The content of the reports were in fact generated just fine. Has anyone seen a similar issue? Or am I not using junitreport correctly.