create
Creates and adds a new extension to this container. A new instance of the given instanceType
will be created using the given constructionArguments
. The extension will be exposed as publicType
. The new instance will have been dynamically made ExtensionAware, which means that you can cast it to ExtensionAware.
Return
The created instance
Since
3.5
Parameters
the extension public type
The extension public type
The name for the extension
The extension instance type
The arguments to be used to construct the extension instance
See also
Throws
When an extension with the given name already exists.
Creates and adds a new extension to this container. A new instance of the given type
will be created using the given constructionArguments
. The extension will be exposed as type
unless the extension itself declares a preferred public type via the org.gradle.api.reflect.HasPublicType protocol. The new instance will have been dynamically made ExtensionAware, which means that you can cast it to ExtensionAware.
Return
The created instance
Parameters
The name for the extension
The type of the extension
The arguments to be used to construct the extension instance
See also
Throws
When an extension with the given name already exists.