Interface KotlinDslScriptsModel


public 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 KotlinDslModelsParameters.PREPARATION_TASK_NAME

By default, the model is built for all the Kotlin DSL scripts known to belong to this build. Restricting the model to an explicit set of scripts via SCRIPTS_GRADLE_PROPERTY_NAME is deprecated and will be removed in Gradle 10.

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 KotlinDslModelsParameters.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 KotlinDslModelsParameters.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 KotlinDslModelsParameters.CORRELATION_ID_GRADLE_PROPERTY_NAME.

Since:
6.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    Restricting the model to an explicit set of scripts is deprecated and will be removed in Gradle 10.
  • Method Summary

    Modifier and Type
    Method
    Description
    Script models by file.
  • Field Details

    • SCRIPTS_GRADLE_PROPERTY_NAME

      @Deprecated static final String SCRIPTS_GRADLE_PROPERTY_NAME
      Deprecated.
      Restricting the model to an explicit set of scripts is deprecated and will be removed in Gradle 10. In Gradle 10, the model will always be built for all the Kotlin DSL scripts of the build.
      Gradle property name for the set of scripts to be queried for.
      Since:
      6.0
      See Also:
  • Method Details