Skip to content

Compatibility with Gradle TestKitopensavvy.prepared.compat.gradlebuildKts

buildKts


suspend fun Project.buildKts(text: String)

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


val Project.buildKts: Prepared<Path>

Accessor for the `build.gradle.kts` file.

Example

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

See also