我有以下任务:
task installMavenLocal(type: Upload) {
description "Installs the artifacts to the local Maven repository."
configuration = configurations['archives']
repositories {
mavenDeployer {
repository url: repositories.mavenLocal().url
}
}
}
当我运行Gradle命令时,我执行以下gradle installMavenLocal -x:test:packageRelease
,是否可以将该命令添加到我的上述任务中,以便开发人员不需要添加-x:test:packageRelease
和它只是在我执行任务时运行?
答案 0 :(得分:0)
您可以使用:
installMavenLocal.dependsOn.remove(tasks.getByPath(":test:packageRelease"))