Gradle Project: Difference between revisions
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
The project instance is available to the [[build.gradle]] script via the <code>project</code> variable, which corresponds to the [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#getProject-- Project.getProject()] accessor. The project instance is not available in [[settings.gradle]], only the root project descriptor via <code>rootProject</code> variable, which corresponds to [https://docs.gradle.org/current/javadoc/org/gradle/api/initialization/Settings.html#getRootProject-- Settings.getRootProject()]. | The project instance is available to the [[build.gradle]] script via the <code>project</code> variable, which corresponds to the [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#getProject-- Project.getProject()] accessor. The project instance is not available in [[settings.gradle]], only the root project descriptor via <code>rootProject</code> variable, which corresponds to [https://docs.gradle.org/current/javadoc/org/gradle/api/initialization/Settings.html#getRootProject-- Settings.getRootProject()]. | ||
=Project API= | =Project API and build.gradle DSL= | ||
The build runtime can be configured with [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#buildscript-groovy.lang.Closure- Project.buildscript(Closure)] which corresponds to the following DSL element: | The build runtime can be configured with [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#buildscript-groovy.lang.Closure- Project.buildscript(Closure)] which corresponds to the following DSL element: |
Revision as of 00:15, 4 October 2020
External
- Project API: org.gradle.api.Project
- Project DSL: https://docs.gradle.org/current/dsl/org.gradle.api.Project.html
Internal
TO DEPLETE
Overview
A Gradle project typically represents a software component to be built by executing a set of tasks in sequence. A project has a direct class representation in the Gradle domain model: org.gradle.api.Project.
The project instance is available to the build.gradle script via the project
variable, which corresponds to the Project.getProject() accessor. The project instance is not available in settings.gradle, only the root project descriptor via rootProject
variable, which corresponds to Settings.getRootProject().
Project API and build.gradle DSL
The build runtime can be configured with Project.buildscript(Closure) which corresponds to the following DSL element:
buildscript {
// configuration closure
}
'
Plugins can be configured with