buildKts

suspend fun Project.buildKts(text: String): <Error class: unknown class>(source)

Helper function to write the build.gradle.kts file.

Example

test("Create a Kotlin build file") {
gradle.project("foo").buildKts("""
println("Loading the project :foo…")
""".trimIndent())
}

See also

Groovy equivalent

Settings file

Select the project


val Project.buildKts: <Error class: unknown class>(source)

Accessor for the build.gradle.kts file.

Example

test("Access the Kotlin build file") {
println(gradle.project("foo").buildKts())
}

See also

Groovy equivalent

Settings file

Select the project