What are some different ways to get git data during a gradle build?

Currently, I’m using com.gorylenko.gradle-git-properties to get git information about a multi-project gradle build.

The problem is that it happens during configuration phase at the root level and makes each build take significantly longer, since it occurs once for each subproject that’s a part of the build. What other options are there for getting the git information during a given gradle build, so the git data can be stored in variables and used in all projects of the multi-project gradle build? The variables are needed for compilation, so they have to be set before that point.

If there isn’t a better plugin to use, maybe there is a way to apply the com.gorylenko.gradle-git-properties plugin only once at the root level and share that info through ext properties to all subprojects? That way, we wouldn’t take a performance hit equal to the number of subprojects included.

Thanks in advance for your feedback!