All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.ksoichiro.console.reporter.ConsoleReporterExtension.groovy Maven / Gradle / Ivy

There is a newer version: 0.6.3
Show newest version
package com.github.ksoichiro.console.reporter

import com.github.ksoichiro.console.reporter.config.CoberturaReportConfig
import com.github.ksoichiro.console.reporter.config.JUnitReportConfig
import com.github.ksoichiro.console.reporter.config.JacocoReportConfig
import org.gradle.api.GradleException
import org.gradle.util.ConfigureUtil

class ConsoleReporterExtension {
    public static final NAME = 'consoleReporter'
    JUnitReportConfig junit
    JacocoReportConfig jacoco
    CoberturaReportConfig cobertura

    ConsoleReporterExtension() {
        junit = new JUnitReportConfig()
        jacoco = new JacocoReportConfig()
        cobertura = new CoberturaReportConfig()
    }

    def methodMissing(String name, def args) {
        if (metaClass.hasProperty(this, name)) {
            return ConfigureUtil.configure(args[0] as Closure, this."$name")
        } else {
            throw new GradleException("Missing method: ${name}")
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy