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

ai.digital.integration.server.deploy.tasks.satellite.DownloadAndExtractSatelliteDistTask.kt Maven / Gradle / Ivy

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

import ai.digital.integration.server.common.constant.PluginConstant.PLUGIN_GROUP
import ai.digital.integration.server.common.util.IntegrationServerUtil
import ai.digital.integration.server.deploy.internals.DeployConfigurationsUtil.Companion.SATELLITE_DIST
import ai.digital.integration.server.deploy.internals.SatelliteUtil
import org.gradle.api.tasks.Copy

open class DownloadAndExtractSatelliteDistTask : Copy() {

    init {
        this.group = PLUGIN_GROUP

        SatelliteUtil.getSatellites(project).forEach { satellite ->
            project.buildscript.dependencies.add(
                SATELLITE_DIST,
                "com.xebialabs.xl-platform.satellite:xl-satellite-server:${satellite.version}@zip"
            )

            val taskName = "downloadAndExtractSatellite${satellite.name}"
            val task = project.tasks.register(taskName, Copy::class.java) {
                from(project.zipTree(project.buildscript.configurations.getByName(SATELLITE_DIST).singleFile))
                into(IntegrationServerUtil.getRelativePathInIntegrationServerDist(project, satellite.name))
            }
            this.dependsOn(task)
        }
    }

    companion object {
        const val NAME = "downloadAndExtractSatelliteServer"
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy