Properties(未翻译)
Property | Description |
allprojects |
包含该项目及其子项目的属性 |
ant |
The |
artifacts |
Returns a handler for assigning artifacts produced by the project to configurations. |
buildDir |
The build directory of this project. The build directory is the directory which all artifacts are generated into. The default value for the build directory is |
buildFile |
The build file Gradle will evaluate against this project object. The default is |
buildscript |
The build script handler for this project. You can use this handler to query details about the build script for this project, and manage the classpath used to compile and execute the project's build script. |
childProjects |
The direct children of this project. |
configurations |
The configurations of this project. |
convention |
The |
defaultTasks |
The names of the default tasks of this project. These are used when no tasks names are provided when starting the build. |
dependencies |
The dependency handler of this project. The returned dependency handler instance can be used for adding new dependencies. For accessing already declared dependencies, the configurations can be used. |
description |
The description of this project. |
extensions |
Allows adding DSL extensions to the project. Useful for plugin authors. |
gradle |
The |
group |
The group of this project. Gradle always uses the |
logger |
The logger for this project. You can use this in your build file to write log messages. |
logging |
The |
name |
The name of this project. The project's name is not necessarily unique within a project hierarchy. You should use the |
parent |
The parent project of this project, if any. |
path |
The path of this project. The path is the fully qualified name of the project. |
pluginManager |
Incubating
The plugin manager for this plugin aware object. |
plugins |
The container of plugins that have been applied to this object. |
project |
Returns this project. This method is useful in build files to explicitly access project properties and methods. For example, using |
projectDir |
The directory containing the project build file. |
properties |
The properties of this project. See here for details of the properties which are available for a project. |
repositories |
Returns a handler to create repositories which are used for retrieving dependencies and uploading artifacts produced by the project. |
resources |
Provides access to resource-specific utility methods, for example factory methods that create various resources. |
rootDir |
The root directory of this project. The root directory is the project directory of the root project. |
rootProject |
The root project for the hierarchy that this project belongs to. In the case of a single-project build, this method returns this project. |
state |
The evaluation state of this project. You can use this to access information about the evaluation of this project, such as whether it has failed. |
status |
The status of this project. Gradle always uses the |
subprojects |
The set containing the subprojects of this project. |
tasks |
The tasks of this project. |
version |
The version of this project. Gradle always uses the |
详情参考官方文档:
https://docs.gradle.org/current/dsl/org.gradle.api.Project.html
https://docs.gradle.org/current/dsl/index.html
https://docs.gradle.org/current/userguide/userguide.html