Project¶
class Project
Represents a Gradle project.
To access an instance of this type, use Gradle.rootProject or Gradle.project.
Properties¶
buildDir¶
The build directory for this Project.
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
-
buildKts: Kotlin equivalent -
settingsGroovy: Settings file -
Gradle.project: Select the project
val Project.buildGroovy: Prepared<Path>
Accessor for the build.gradle file.
Example¶
See also
-
buildKts: Kotlin equivalent -
settingsGroovy: Settings file -
Gradle.project: Select the project
buildKts¶
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
-
buildGroovy: Groovy equivalent -
settingsKts: Settings file -
Gradle.project: Select the project
Accessor for the build.gradle.kts file.
Example¶
See also
-
buildGroovy: Groovy equivalent -
settingsKts: Settings file -
Gradle.project: Select the project
dir¶
The subdirectory of Gradle.dir in which this project is located.