# SharedModelDefaults

@Incubating
@ServiceScope(value = Build::class)
interface SharedModelDefaults(source)

Shared model defaults for configuring project types. Defaults apply initial values to the model objects of project types. When a project type plugin is applied to a project, the model object for the project type will be pre-configured with the values set in the default.

#### Since

8.10

## Functions

add
Link copied to clipboard
abstract fun <T> add(name: String, publicType: Class<T>, configureAction: Action<in T>)
Adds a model default for the project type specified by the given name.
add
Link copied to clipboard
@Incubating
inline fun <T : Any> SharedModelDefaults. add(name: String, publicType: KClass<T>, configureAction: Action<in T>)

Kotlin extension function taking kotlin.reflect.KClass for org.gradle.api.initialization.SharedModelDefaults.add.

getLayout
Link copied to clipboard
abstract fun getLayout(): ProjectLayout
Provides access to the project layout when default configurations are evaluated in the context of specific projects.