0
我已经写了下面的简单脚本:构造函数首先声明
task init << {
println "init";
}
task hello(dependsOn: init) << {
println "hello";
}
task super(dependsOn: hello) << {
println "super"
}
但我得到当我试图执行gradle super
错误:
build file 'D:\gradle\build.gradle': 9: Constructor call must be the first statement in
a constructor. at line: 9 column: 12.
File: build_69b6a3lkqqtk7j84lsls47ccta @ line 9, column 12.
task super(dependsOn: hello) << {
什么是问题?