Skip to content

Compatibility with Gradle TestKitopensavvy.prepared.compat.gradlebuildGroovy

buildGroovy

suspend fun Project.buildGroovy(text: String)

Helper function to write the build.gradle file.

Example

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

See also

val Project.buildGroovy: Prepared<Path>

Accessor for the build.gradle file.

Example

test("Access the groovy build file") {
    println(gradle.project("foo").buildGroovy())
}

See also