Merge branch 'custom-command-ninja-deps' into release-3.27

Merge-request: !8984