Not sure if this is a potential bug, my misunderstanding:
Take the simple example from the variant docs
model {
tasks {
buildAllExecutables(Task) {
dependsOn $.binaries.findAll { it.buildable }
}
}
}
This works just fine. Now embed the same code within a multi-project, single build script situation i.e.
project(’:bob’) { // <-- this bit’s new
model {
tasks {
buildAllExecutables(Task) {
dependsOn $.binaries.findAll { it.buildable }
}
}
}
} // <-- this bit’s new
and you get the error:
build file ‘test.gradle’: 12: Invalid variable name. Must include a letter but only found: $. At [12:23] @ line 12, column 23.
dependsOn $.binaries.findAll { it.buildable }
It appears you can’t use the $. syntax, once you’re within the project scope.
You can pull the content out into a separate file, then apply from, but …
Is it my misunderstanding of $., is there some alternative/appropriate syntax or is there an issue?
Anyone any ideas ?