ai.digital.integration.server.common.domain.providers.DefaultProviderContainer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of integration-server-gradle-plugin Show documentation
Show all versions of integration-server-gradle-plugin Show documentation
The easy way to get custom setup for Deploy up and running
package ai.digital.integration.server.common.domain.providers
import groovy.lang.Closure
import org.gradle.api.Action
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.provider.Property
import org.gradle.kotlin.dsl.property
import org.gradle.util.internal.ConfigureUtil
@Suppress("UnstableApiUsage")
internal class DefaultProviderContainer(delegate: NamedDomainObjectContainer, project: Project) :
OperatorProviderContainer, NamedDomainObjectContainer by delegate {
private var _activeProviderName: Property = project.objects.property()
override var activeProviderName: String
get() = _activeProviderName.get()
set(value) {
_activeProviderName.set(value)
}
override fun awsEks(): AwsEksProvider = awsEks {}
override fun awsEks(closure: Closure<*>): AwsEksProvider {
return awsEks(ConfigureUtil.configureUsing(closure))
}
override fun awsEks(action: Action): AwsEksProvider {
return (findByName("awsEks")
?: create("awsEks") {
action.execute(this)
}) as AwsEksProvider
}
override fun awsOpenshift(): AwsOpenshiftProvider = awsOpenshift {}
override fun awsOpenshift(closure: Closure<*>): AwsOpenshiftProvider {
return awsOpenshift(ConfigureUtil.configureUsing(closure))
}
override fun awsOpenshift(action: Action): AwsOpenshiftProvider {
return (findByName("awsOpenshift")
?: create("awsOpenshift") {
action.execute(this)
}) as AwsOpenshiftProvider
}
override fun azureAks(): AzureAksProvider = azureAks {}
override fun azureAks(closure: Closure<*>): AzureAksProvider {
return azureAks(ConfigureUtil.configureUsing(closure))
}
override fun azureAks(action: Action): AzureAksProvider {
return (findByName("azureAks")
?: create("azureAks") {
action.execute(this)
}) as AzureAksProvider
}
override fun gcpGke(): GcpGkeProvider = gcpGke {}
override fun gcpGke(closure: Closure<*>): GcpGkeProvider {
return gcpGke(ConfigureUtil.configureUsing(closure))
}
override fun gcpGke(action: Action): GcpGkeProvider {
return (findByName("gcpGke")
?: create("gcpGke") {
action.execute(this)
}) as GcpGkeProvider
}
override fun onPremise(): OnPremiseProvider = onPremise {}
override fun onPremise(closure: Closure<*>): OnPremiseProvider {
return onPremise(ConfigureUtil.configureUsing(closure))
}
override fun onPremise(action: Action): OnPremiseProvider {
return (findByName("onPremise")
?: create("onPremise") {
action.execute(this)
}) as OnPremiseProvider
}
override fun vmwareOpenshift(): VmwareOpenshiftProvider = vmwareOpenshift {}
override fun vmwareOpenshift(closure: Closure<*>): VmwareOpenshiftProvider {
return vmwareOpenshift(ConfigureUtil.configureUsing(closure))
}
override fun vmwareOpenshift(action: Action): VmwareOpenshiftProvider {
return (findByName("vmwareOpenshift")
?: create("vmwareOpenshift") {
action.execute(this)
}) as VmwareOpenshiftProvider
}
}