Sergej Koščejev
09/22/2025, 11:48 AMMartin
09/22/2025, 11:59 AMSergej Koščejev
09/22/2025, 11:59 AMMartin
09/22/2025, 12:00 PMMartin
09/22/2025, 12:00 PMBuildService maybeNiels Doucet
09/22/2025, 12:00 PMsettings.gradle.beforeProject { version = infoProvider.get() }Martin
09/22/2025, 12:01 PMinfoProvider live? the settings classloader?Niels Doucet
09/22/2025, 12:03 PMsettings.gradle.settingsEvaluated {
// Create the version info provider
val infoProvider: Provider<VersionInfo> =
settings.providers.of(VersionInfoSource::class.java)
yes, the VersionInfoSource object just takes input from our custom settings plugin extension and takes information from gitMartin
09/22/2025, 12:05 PMJendrik Johannes
09/22/2025, 12:21 PMbeforeProject is the best solution. If possible, use the new lifecycle hook though:
gradle.lifecycle.beforeProject {}
That one is fully compatible with project isolation.Vampire
09/22/2025, 12:27 PMproject.version.
This custom version retrieves the build label service and forwards the request for the build identifier to the service.
So there is one central place where the identifier is calculated once, the service, and each project has a version instance that forwards the request to that one service.ysb33r
09/22/2025, 12:45 PMIn our (still 7.6.4, don't ask) buildWe don't discriminate here 😸