add
Adds a new extension to this container. Adding an extension of name 'foo' will:
- add 'foo' dynamic property
- add 'foo' dynamic method that accepts a closure that is a configuration script block
publicType
.Since
3.5
Parameters
public Type
The extension public type
name
The name for the extension
extension
Any object implementing publicType
Throws
When an extension with the given name already exists.
Adds a new extension to this container. Adding an extension of name 'foo' will:
- add 'foo' dynamic property
- add 'foo' dynamic method that accepts a closure that is a configuration script block
extension.getClass()
unless the extension itself declares a preferred public type via the org.gradle.api.reflect.HasPublicType protocol.Parameters
name
The name for the extension
extension
Any object
Throws
When an extension with the given name already exists