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

nebula.plugin.ospackage.daemon.DaemonTemplateTask.groovy Maven / Gradle / Ivy

There is a newer version: 3.1.1
Show newest version
package nebula.plugin.ospackage.daemon

import org.gradle.api.internal.ConventionTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction

/**
 * Monster class that does everything.
 */
class DaemonTemplateTask extends ConventionTask {
    //@Input
    Map context

    //@Input
    Collection templates

    @Input
    File destDir

    @TaskAction
    def template() {
        TemplateHelper templateHelper = new TemplateHelper(getDestDir(), '/nebula/plugin/ospackage/daemon')
        getTemplates().collect { String templateName ->
            templateHelper.generateFile(templateName, getContext())
        }
    }

    //@OutputFiles
    Collection getTemplatesOutout() {
        return templates.collect {
            new File(destDir, it)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy