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

ai.digital.integration.server.deploy.tasks.cli.CliOverlaysTask.kt Maven / Gradle / Ivy

There is a newer version: 23.3.0-1025.941
Show newest version
package ai.digital.integration.server.deploy.tasks.cli

import ai.digital.integration.server.common.constant.PluginConstant.PLUGIN_GROUP
import ai.digital.integration.server.common.util.OverlaysUtil
import ai.digital.integration.server.deploy.internals.CliUtil
import org.gradle.api.DefaultTask

open class CliOverlaysTask : DefaultTask() {

    companion object {
        const val NAME = "cliOverlays"
        const val PREFIX = "cli"
    }

    init {
        this.group = PLUGIN_GROUP
        this.mustRunAfter(DownloadAndExtractCliDistTask.NAME)
        this.mustRunAfter(CliCleanDefaultExtTask.NAME)
        this.mustRunAfter(CopyCliBuildArtifactsTask.NAME)
        val currentTask = this

        project.afterEvaluate {
            CliUtil.getCli(project).overlays.forEach { overlay ->
                OverlaysUtil.defineOverlay(project,
                    currentTask,
                    CliUtil.getWorkingDir(project),
                    PREFIX,
                    overlay,
                    listOf(DownloadAndExtractCliDistTask.NAME)
                )
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy