Skip to content

Compatibility with Gradle TestKitopensavvy.prepared.compat.gradleGradle

Gradle

class Gradle

Control center for Gradle TestKit. See gradle.

Properties

dir

val dir: Prepared<Path>

A temporary directory unique for each test, in which the Gradle files are created.

rootProject

Accessor for the files of the root project.

settingsGroovy

val Gradle.settingsGroovy: Prepared<Path>

Accessor for the settings.gradle file.

settingsKts

val Gradle.settingsKts: Prepared<Path>

Accessor for the settings.gradle.kts file.

Functions

project

fun project(path: String): Project

Accessor for the files of a project, given its path.

runner

suspend fun runner(): GradleRunner

Instantiates a GradleRunner in dir.

settingsGroovy

suspend fun Gradle.settingsGroovy(text: String)

Helper function to write the settings.gradle file.

settingsKts

suspend fun Gradle.settingsKts(text: String)

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