美文网首页
gradle中用的一些路径环境变量

gradle中用的一些路径环境变量

作者: 不知名的蛋挞 | 来源:发表于2018-12-06 20:52 被阅读21次

配置gradle有时会用一些路径相关的环境变量,常用的几个定义如下。

projectDir

The directory containing the project build file.

rootDir

The root directory of this project. The root directory is the project directory of the root project.

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 projectDir/build

【举例说明】

新建一个工程名为InspectGradleDir,路径为

D:\study\android\projects\InspectGradleDir

那么rootDir对应

D:\study\android\projects\InspectGradleDir

projectDir对应

D:\study\android\projects\InspectGradleDir\app

buildDir对应

D:\study\android\projects\InspectGradleDir\app\build

相关文章

网友评论

      本文标题:gradle中用的一些路径环境变量

      本文链接:https://www.haomeiwen.com/subject/ftsacqtx.html