build: Improve development in subprojects

This commit is contained in:
2026-03-16 12:32:00 +01:00
parent 1b9958f980
commit d69eb85d81
6 changed files with 18 additions and 3 deletions

View File

@@ -1,5 +1,8 @@
import java.util.Properties
val rootProperties = Properties()
project.layout.settingsDirectory.file("../gradle.properties").asFile.inputStream().use { rootProperties.load(it) }
rootProperties.forEach { (key, value) -> project.ext.set(key.toString(), value.toString()) }
val rootPropertiesFile = project.layout.settingsDirectory.file("../gradle.properties").asFile
if (rootPropertiesFile.exists()) {
Properties()
.apply { rootPropertiesFile.inputStream().use { load(it) } }
.forEach { (key, value) -> project.ext.set(key.toString(), value.toString()) }
}