Compatibility with Gradle TestKit • opensavvy.prepared.compat.gradle • Gradle • runner
runner
suspend fun runner(): GradleRunner
Instantiates a GradleRunner in dir.
Examples
test("Create the root build.gradle.kts file") {
gradle.rootProject.buildKts("""
tasks.register("print") {
doLast {
println("Configuring the project")
}
}
""".trimIndent()
val result = gradle.runner()
.withPluginClasspath()
.withArguments("print")
.build()
result.output shouldContain "Configuring the project"
}