我有一个名为'FunctionalityMaintainer'的gradle项目,我试图在build.gradle中独立执行两个JavaExec任务。 以下是我的build.gradle
的结构task(findPattern, dependsOn:'classes', type:JavaExec){
main = 'org.package.somepackage1.PatternMatcher'
classpath = sourceSets.main.runtimeClasspath
args = [project.getProperty('baseDir'), project.getProperty('playGroundWorkspace')]
}
task(deleteZip, dependsOn:'classes', type:JavaExec){
main = 'org.package.somepackage2.ZipDeleter'
classpath = sourceSets.main.runtimeClasspath
args = [project.getProperty('zipPath')]
}
如果执行以下命令,则说出deleteZip任务-
gradle deleteZip -PzipPath='D:/PathtoZip'
失败并显示错误
could not get unknown property 'baseDir' for root project 'FunctionalityMaintainer' of type org.gradle.api.Project.
有人可以告诉我我在做什么错吗?