Thanks for this, fits perfect.
I kotlinyfied it slightly as I couldn’t resist
fun PluginManagementSpec.loadProperties(fileName: String, path: String = rootDir.absolutePath) = java.util.Properties().also { properties ->
File("$path/$fileName").inputStream().use {
properties.load(it)
}
}
val versions: java.util.Properties = loadProperties("gradle.properties")