# KotlinDslScriptsModel

interface KotlinDslScriptsModel

Editor model for a set of Kotlin DSL scripts.

Can only be requested on the root project, the builder will throw otherwise.

Requires the `prepareKotlinBuildScriptModel` task to be executed before building the model. See PREPARATION_TASK_NAME

The set of scripts can be provided as a Gradle property named `org.gradle.kotlin.dsl.provider.scripts`, as a list of absolute paths separated by `|`. If none are provided, then the model is built for all the Kotlin DSL scripts known to belong to this build. See SCRIPTS_GRADLE_PROPERTY_NAME.

The Gradle Kotlin DSL script provider must be running in "classpath" mode. This is done by providing the system property `-Dorg.gradle.kotlin.dsl.provider.mode=classpath`. See CLASSPATH_MODE_SYSTEM_PROPERTY_DECLARATION. In this mode, Gradle Kotlin DSL scripts compilation or evaluation failures will be ignored, collected and exceptions will be returned in the built model. Optionally, it can also be set in a strict mode by providing the system property value `-Dorg.gradle.kotlin.dsl.provider.mode=strict-classpath`. See STRICT_CLASSPATH_MODE_SYSTEM_PROPERTY_DECLARATION.

Optionally, an identifier can be provided as a Gradle property named `org.gradle.kotlin.dsl.provider.cid`, it can then be used to correlate Gradle and TAPI client log statements. See CORRELATION_ID_GRADLE_PROPERTY_NAME.

#### Since

6.0

## Properties

SCRIPTS_GRADLE_PROPERTY_NAME
Link copied to clipboard
val SCRIPTS_GRADLE_PROPERTY_NAME: String = "org.gradle.tooling.model.kotlin.dsl.scripts"
Gradle property name for the set of scripts to be queried for.

## Functions

getScriptModels
Link copied to clipboard
abstract fun getScriptModels(): Map<File, KotlinDslScriptModel>
Script models by file.