Use `gradle-buildconfig-plugin` to generate dependency versions
Generate build config for the versions like
https://github.com/diffplug/spotless/blame/a0ac60042bb4470f9dd7992e11541ca37d025f75/lib/build.gradle#L99
And refer to the generated config for
https://github.com/diffplug/spotless/blob/8d4cd28cb1ed3f2ebfd0e48cc8e5715ef65d6440/lib/src/main/java/com/diffplug/spotless/java/GoogleJavaFormatStep.java#L124
There is an example like https://github.com/vanniktech/gradle-maven-publish-plugin/blob/d0e50fec7a07ef91fde62ae5cb0e4b4b4769d797/plugin/build.gradle.kts#L35-L110
This should be stacked on #2704.
I'm not familiar with this, but I'm open to it. What is the problem that it solves?
@renovate-bot send the updates like #2345, we have to update GoogleJavaFormatStep.java manually to reflect the latest version string. If we apply the build config stuff, the latest version in the lib will always be refed by
.add(17, BuildConfig.VERSION_GJF); // default version
and BuildConfig.VERSION_GJF always reflects the latest version bumped by @renovate-bot.
Wow! Great idea, I like it!