package com.github.fowlie

import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction

/**
 * Created by mfa on 22.09.2014.
 */
class GradleJenkinsTestTask extends DefaultTask {
    @TaskAction
    def jenkinsTest() {
        inputs.files test.outputs.files
        doLast {
            def testResults = test.getReports().getJunitXml().getDestination()
            if (testResults.exists()) testResults.eachFile {
                it.lastModified = System.currentTimeMillis()
            }
        }
    }
}

package com.github.fowlie

import org.gradle.api.DefaultTask
import org.gradle.api.tasks.TaskAction

class GradleJenkinsTestTask extends DefaultTask {
    @TaskAction
    def jenkinsTest() {
            def testResults = project.test.getReports().getJunitXml().getDestination()
            if (testResults.exists()) testResults.eachFile {
                it.lastModified = System.currentTimeMillis()
            }
    }
}

Remove created by comment, input files and doLast closure
Remove created by comment, input files and doLast closure
