api / org.gradle.nativeplatform / FlavorContainer

FlavorContainer

@Incubating interface FlavorContainer : NamedDomainObjectContainer<Flavor>

A container of Flavors.

If no flavor is explicitly configured, will contain a single Flavor named 'default'. Any flavors explicitly configured will overwrite the default flavor.

Inherited Functions

configure

abstract fun configure(configureClosure: Closure<Any>): NamedDomainObjectContainer<T>

Allows the container to be configured, creating missing objects as they are referenced.

TODO: example usage

create

abstract fun create(name: String): T

Creates a new item with the given name, adding it to this container.

abstract fun create(name: String, configureClosure: Closure<Any>): T

Creates a new item with the given name, adding it to this container, then configuring it with the given closure.

abstract fun create(name: String, configureAction: Action<in T>): T

Creates a new item with the given name, adding it to this container, then configuring it with the given action.

maybeCreate

abstract fun maybeCreate(name: String): T

Looks for an item with the given name, creating and adding it to this container if it does not exist.

Extension Properties

ext

val FlavorContainer.ext: ExtraPropertiesExtension

Retrieves the ext extension.

Extension Functions

ext

fun FlavorContainer.ext(configure: ExtraPropertiesExtension.() -> Unit): Unit

Configures the ext extension.