Gradle Project: Difference between revisions
Line 29: | Line 29: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
More details on using plugins are available in: {{Internal|Gradle_Plugin_Concepts#Using_a_Plugin|Using a Plugin}} | More details on using plugins are available in: {{Internal|Gradle_Plugin_Concepts#Using_a_Plugin|Using a Plugin}} | ||
Dependencies can be managed with [], [] and the "dependencies" DSL element: | Dependencies can be managed with [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#dependencies-groovy.lang.Closure- Project.dependencies(Closure)], [https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html#getDependencies-- Project.getDependencies()] and the "dependencies" DSL element: | ||
<syntaxhighlight lang='groovy'> | <syntaxhighlight lang='groovy'> | ||
dependencies { | dependencies { |
Revision as of 00:38, 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 script classpath for the project can be configured with Project.buildscript(Closure) which corresponds to the "buildscript" DSL element:
buildscript {
// configuration closure
}
More details are available in:
Plugins for the build can be declare with PluginAware.apply(...), which corresponds to the "apply" DSL element:
apply plugin:|from: '...'
More details on using plugins are available in:
Dependencies can be managed with Project.dependencies(Closure), Project.getDependencies() and the "dependencies" DSL element:
dependencies {
// configuration closure
}