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

com.github.leandroborgesferreira.dagcommand.DagCommandPlugin.kt Maven / Gradle / Ivy

There is a newer version: 1.7.0
Show newest version
package com.github.leandroborgesferreira.dagcommand

import com.github.leandroborgesferreira.dagcommand.adapter.parse
import com.github.leandroborgesferreira.dagcommand.extension.CommandExtension
import com.github.leandroborgesferreira.dagcommand.task.CommandTask
import com.github.leandroborgesferreira.dagcommand.utils.create
import com.github.leandroborgesferreira.dagcommand.utils.registerExt
import org.gradle.api.Action
import org.gradle.api.Plugin
import org.gradle.api.Project

private const val CONFIGURE_CLOJURE_NAME = "dagCommand"
private const val CONFIGURE_COMMAND_NAME = "dag-command"

class DagCommandPlugin : Plugin {
    override fun apply(project: Project) {
        val extension: CommandExtension = project.extensions.create(CONFIGURE_CLOJURE_NAME)

        project.tasks.registerExt(CONFIGURE_COMMAND_NAME, Action {
            it.config = extension.parse()
        })
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy