How do I best address the Develocity warning `The ...
# caching
j
How do I best address the Develocity warning
The build cache configuration of the root build differs from the build cache configuration of the early evaluated ':plugins' included build. It is recommended to keep them consistent, see here.
when using
Copy code
pluginManagement {
  includeBuild("gradle/plugins")
}
On the documentation page it only say: > NOTE: This configuration precedence does not apply to plugin builds included through
pluginManagement
as these are loaded before the cache configuration itself. But not what I can do. Should I duplicate the build cache configuration? E.g. in these two places: •
gradle/plugins/setting.gradle.kts
gradle/plugins/src/main/kotlin/build-cache.setting.gradle.kts
(to be applied in settings.gradle.kts in roo) Or is there another/better solution?
🤔 This would mean copying the complete Develocity configuration... is there some smart way to put that somewhere else. Into a separate file maybe? Maybe someone build a solution for this already?
v
I guess only if you either publish the configuration as separate plugin, or by using a bad-practice legacy script plugin / using the convention plugin as legacy script plugin in the plugin build..
r
I did something similar in my project. Ended up duplicating the configuration in the included build.
r
we ended up having most of our build cache setup logic in an init script that all of the included builds use too
r
Anything to be concerned about or take extra care of.. while reusing init script logic in composite build and all included builds
r
if you declare init scripts globally (on ci or on local machines) just be aware they're applied to EVERY gradle project you build.
r
Ahh sure, thanks.