Manual takeover of https://github.com/flutter/flutter/pull/145003, to include some gradle lockfile changes.