I write a plugin that has to measure the duration of build configuration. I want to make it Gradle Configuration Cache compatible as well.
I see that this 3rd party plugin, gradle-analytics-plugin does exactly what I’m looking for, but uses InternalBuildService for that: see BuildInitializationService. At the same time, I can see in the Gradle documentation that if plugins intend to be compatible with configuration cache, they “must not register any build listeners”.
My question: is it idiomatic to use InternalBuildService in the case I describe, or, if it’s not, could you share an alternative for that? Are there any threats to use InternalBuildService in a way that gradle-analytics-plugin uses it?