【发布时间】:2017-03-07 15:36:28
【问题描述】:
我有以下 Gradle 任务:
task makeZipDependencies << {
allDeps = (configurations.runtime + configurations.archives.allArtifacts.files).findAll {
!(it.name =~ /clover/)
} .unique()
if ("myApp".equals(project.name)) {
rootProject.childProjectsRecursive.each {
try {
databaseSqlFileDeps.put(it.name, it.configurations["mySQLFiles"].files)
} catch (UnknownConfigurationException e) {
}
}
}
当我使用 java 7 和 gradle 1.7 运行我的项目时,这并没有导致错误。
但是,我已迁移到 Java 8 和 gradle 3.4.1,现在出现此错误:
Execution failed for task "makeZipDependencies", could not get unknown property:childProjectsRecursive for root Project myApp of type org.gradle.api.project"
我需要对我的任务进行哪些更改才能解决此问题?
【问题讨论】: