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

com.javiersc.hubdle.project.extensions.apis.HubdleSourceSetConfigurableExtension.kt Maven / Gradle / Ivy

There is a newer version: 0.7.18
Show newest version
package com.javiersc.hubdle.project.extensions.apis

import com.javiersc.hubdle.project.extensions.HubdleDslMarker
import org.gradle.api.Action
import org.gradle.api.NamedDomainObjectProvider
import org.gradle.api.Project
import org.gradle.api.provider.Property

public abstract class HubdleSourceSetConfigurableExtension(project: Project) :
    HubdleMinimalSourceSetConfigurableExtension(project) {

    override val project: Project
        get() = super.project

    public val isTestFunctionalEnabled: Property = property { false }

    internal val isTestFunctionalFullEnabled: Property = property {
        isTestFunctionalEnabled.get() && isFullEnabled.get()
    }

    public abstract val testFunctional: NamedDomainObjectProvider

    @HubdleDslMarker
    public fun testFunctional(action: Action = Action {}) {
        isTestFunctionalEnabled.set(true)
        lazyConfigurable { testFunctional.configure(action) }
    }

    public val isTestIntegrationEnabled: Property = property { false }

    internal val isTestIntegrationFullEnabled: Property = property {
        isTestIntegrationEnabled.get() && isFullEnabled.get()
    }

    public abstract val testIntegration: NamedDomainObjectProvider

    @HubdleDslMarker
    public fun testIntegration(action: Action = Action {}) {
        isTestIntegrationEnabled.set(true)
        lazyConfigurable { testIntegration.configure(action) }
    }

    public val isTestFixturesEnabled: Property = property { false }

    internal val isTestFixturesFullEnabled: Property = property {
        isTestFixturesEnabled.get() && isFullEnabled.get()
    }

    public abstract val testFixtures: NamedDomainObjectProvider

    @HubdleDslMarker
    public fun testFixtures(action: Action = Action {}) {
        isTestFixturesEnabled.set(true)
        lazyConfigurable { testFixtures.configure(action) }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy