What's the point of safe vs unsafe ApplyActions? A...
# declarative-gradle
p
What's the point of safe vs unsafe ApplyActions? AFAIK, you an unsafe action has no access to any mutable state (the project) and is side-effect free. But when registering a task via the safe
TaskRegistrar
, you can easily get the attached project instance in a safe ApplyAction:
Copy code
var project: Project? = null
taskRegistrar.register("hack") {
  project = this.project
}.get()
project!!
Will this hack be "supported" due to
Task.getProject
or do you plan to introduce a safe Task super interface (maybe without antBuilder and property method too)?