You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(commands): declare the project with provideProject()
Every command that needs a project called initializeProjectData() on the
process-wide project object, from a constructor, a setup or a handler,
and a command that forgot - preview - worked only when another service
had happened to initialize it first.
provideProject() contributes a COMMAND_PRECONDITIONS entry that resolves
the project the command line names before the command's setup and
arguments policy, failing with the usual "no project found" error when
there is none. The 42 commands that need a project declare it in their
providers and inject the ProjectData contract; the initializer call is
gone from all of them, along with the constructors and setups that only
existed to make it. The four commands for which a project is optional -
clean and the device file commands - resolve it behind their own check.
The gradle build-args service resolves the project of the build's
directory through the project-data service instead of initializing the
shared object.
0 commit comments