Gradle中有没有办法从子项目中调用父函数?如果我将父项目和功能定义为:
def testMethod() {
println("TestMethod called from directory ${project.projectDir}")
}
和子项目为:
task subTest << {
println("I'm subTest task from ${project.projectDir}")
testMethod()
}
从命令行调用它会导致:
Could not find method testMethod() for arguments [] on root project 'subsys1'