Rules for resolving Project variables in build.gradle
satya - 8/14/2018, 5:30:28 PM
At a very high level
1. General rules of Groovy DSL apply
2. Project object is bound to the build.gradle script
3. There are some methods on Project which takes in closures whose delegates are unique to those methods. Ex: repositories, dependencies etc.
4. The build.gradle in addition to having a delegate is itself a "Script" object. This object itself has many methods and properties
5. build.gradle is made up of zero or more statements and script blocks
6. Each statement may refer to a property, or a method
7. A method may have a script block as an input
8. there can be script blocks that are not tied to methods on the Project and instead they are processed through initial passes (ex: buildScript, plugins, etc). These script blocks also have their own delegates.
9. Script blocks may have restricted syntax. For example plugins {} allows only one type of syntax and is not generalized script
10. Creating a task is a method call
11. Creating a task will add the task as a property to the project
12. A task as a property of the project can have its own script block where the task is the delegate.
13. Each object including the delegated objects can have "ext" as an extension of that object.
14. these ext instance can be configured with its own script to add additional variables
15. Additional extension objects can be added via script
16. Some delegates may reinterpret statements or translate statements not directly to existing method names, but alternate method names.
satya - 8/14/2018, 5:30:50 PM
Will try to get into each of these aspects individually now
Will try to get into each of these aspects individually now