【发布时间】:2020-05-08 17:31:25
【问题描述】:
在我的 gradle 构建中有多个任务,我正在传递参数运行时间。当我进行 gradle 构建时构建失败
下面是两个带参数运行时间的任务
任务1
task downloadFile(type: MyDownload) {
sourceUrl = srcUrl
target = new File(destUrl, 'build.zip')
}
任务2
task unzip(type: Copy) {
def zipFile = file(zipFileInput)
def outputDir = file(zipFileOutput)
from zipTree(zipFile)
into outputDir
}
请提出解决问题的解决方案
【问题讨论】:
-
什么错误?什么输入?
-
我正在运行这样的任务 gradle unzip -PzipFileInput="location of the file" -PzipFileOutput="location of the file"
-
我在运行 gradle build 时遇到错误,无法为 org.gradle.api.Project 类型的根项目“mldata2”获取未知属性“zipFileInput”。
标签: gradle