Hi! At first glance it looks useful to get rid of extra actions the user needs to do to re-baseline dependencies:
update deps and get the build error
./gradlew dependencyGuardBaseline
commit updated baselines to git
build again
But, on the other hand, if "auto-rebaseline" will be in gradle's plugin configuration and everything will be done automatically, it will be implicit and less transparent. It will be easy to forget to commit updated baselines to git after auto-rebaseline. In such case it will be unclear, why build is successful on local machine, but fails on CI.
There could be a build flag to explicitly specify that baselines must be updated in case of error. Also there could be corresponding message in build log after auto-rebaseline.
Another question — should all the baselines in the project be updated in such case or only baselines in the module being build?
Actually, the most explicit way is to get build error and re-baseline manually. It won't take a lot of time, especially with configuration cache enabled, because re-baselining itself takes less than 1 second even on the large-scale project. And the command to re-baseline is listed in the build error.
Hi! At first glance it looks useful to get rid of extra actions the user needs to do to re-baseline dependencies:
./gradlew dependencyGuardBaseline
But, on the other hand, if "auto-rebaseline" will be in gradle's plugin configuration and everything will be done automatically, it will be implicit and less transparent. It will be easy to forget to commit updated baselines to git after auto-rebaseline. In such case it will be unclear, why build is successful on local machine, but fails on CI.
There could be a build flag to explicitly specify that baselines must be updated in case of error. Also there could be corresponding message in build log after auto-rebaseline.
./gradlew :app:assembleDebug --dependency-guard-auto-rebaseline
Another question — should all the baselines in the project be updated in such case or only baselines in the module being build?
Actually, the most explicit way is to get build error and re-baseline manually. It won't take a lot of time, especially with configuration cache enabled, because re-baselining itself takes less than 1 second even on the large-scale project. And the command to re-baseline is listed in the build error.