api / org.gradle.nativeplatform.toolchain / NativeToolChainRegistry

NativeToolChainRegistry

@Incubating interface NativeToolChainRegistry : ExtensiblePolymorphicDomainObjectContainer<NativeToolChain>, ToolChainRegistry<NativePlatform, NativeToolChain>

A container for NativeToolChains.

Inherited Functions

getForPlatform

abstract fun getForPlatform(targetPlatform: P): T

Returns the best tool chain to build for the target platform.

registerBinding

abstract fun <U : T> registerBinding(type: Class<U>, implementationType: Class<out U>): Unit

Registers a binding from the specified "public" domain object type to the specified implementation type. Whenever the container is asked to create an element with the binding's public type, it will instantiate the binding's implementation type. If the implementation type has a constructor annotated with javax.inject.Inject, its arguments will be injected.

In general, registering a binding is preferable over implementing and registering a factory.

registerFactory

abstract fun <U : T> registerFactory(type: Class<U>, factory: NamedDomainObjectFactory<out U>): Unit
abstract fun <U : T> registerFactory(type: Class<U>, factory: Closure<out U>): Unit

Registers a factory for creating elements of the specified type. Typically, the specified type is an interface type.

Extension Properties

ext

val NativeToolChainRegistry.ext: ExtraPropertiesExtension

Retrieves the ext extension.

Extension Functions

ext

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

Configures the ext extension.