Slackbot
09/13/2022, 10:47 AMThomas Broyer
09/13/2022, 11:11 AMTask::getProject
should be the same.
But I'd say the task shouldn't access the project by itself, either the plugin should configure task's properties with values computed from the project: or the task should be injected services rather than accessing them on the project (e.g. inject ObjectFactory
or ExecOperations
rather than using Project#getObjects
resp. `Project#exec`/`Project#javaExec`); see https://docs.gradle.org/current/userguide/custom_gradle_types.html#service_injectionJavi
09/13/2022, 11:24 AMregister<Foo>("someTask") {
this.project
target
}
Thomas Broyer
09/13/2022, 11:33 AMproject
passed to the plugin then, but that shouldn't really matter (even with configuration cache enabled afaict)