# model

abstract fun <T> model(modelType: Class<T>): ModelBuilder<T>(source)

Creates a builder which can be used to query the model of the given type.

Any of following models types may be available, depending on the version of Gradle being used by the target build:

- org.gradle.tooling.model.gradle.GradleBuild
- org.gradle.tooling.model.build.BuildEnvironment
- org.gradle.tooling.model.build.Help
- org.gradle.tooling.model.GradleProject
- org.gradle.tooling.model.gradle.BuildInvocations
- org.gradle.tooling.model.gradle.ProjectPublications
- org.gradle.tooling.model.idea.IdeaProject
- org.gradle.tooling.model.idea.BasicIdeaProject
- org.gradle.tooling.model.eclipse.EclipseProject
- org.gradle.tooling.model.eclipse.HierarchicalEclipseProject

A build may also expose additional custom tooling models. You can use this method to query these models.

Requires Gradle 1.0-milestone-8 or later.

#### Return

The builder.

#### Since

1.0

#### Parameters

modelType

The model type

<T>

The model type.