Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 20541

Custom JaCoCo Gradle Plugin - exclude files in report

$
0
0

I’m new to Gradle and Groovy. I have something like this in my build.gradle file:

jacocoTestReport {
    afterEvaluate {
        classDirectories.setFrom(files(classDirectories.files.collect {
            fileTree(dir: it, exclude: ['aaa/bbb.*', 'ccc/ddd/*',])
        }))
    }
}

Now, I need this in my custom plugin. But I’m not sure how to set these excludes to it. I have something like this:

project.afterEvaluate { p ->
    def reportTask = project.tasks.findByName('jacocoTestReport') as JacocoReport
    reportTask.classDirectories.setFrom(reportTask.classDirectories.files.) // Now what?
}

And I’m stuck here. Can you help me sort this out, please?


Viewing all articles
Browse latest Browse all 20541

Latest Images

Trending Articles



Latest Images