I am reading documentation about native builds. And there is a following example for building all variants.
model {
tasks {
buildAllExecutables(Task) {
dependsOn $.binaries.findAll { it.buildable }
}
}
}
Link to documentation
What is the meaning of this dollar sign before binaries container?
The $.
notation is a way to reference other elements of the model. By "the model" I mean all the stuff you see when you run gradle model
. So when we do $.binaries
we are telling Gradle to go searching for a model element named "binaries". As another example, I could use $.tasks.foo
to reference the task named "foo".
See the documentation for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With