-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
34 lines (29 loc) · 1.28 KB
/
settings.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* Copyright 2023-2024 Broadcom. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import java.io.FileInputStream
import java.util.*
pluginManagement {
includeBuild("build-tools/publishing")
includeBuild("build-tools/convention-plugins")
}
rootProject.name = "spring-integration-gemfire"
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
val properties = Properties()
properties.load(FileInputStream("gradle.properties"))
versionOverrideFromProperties(this, properties)
}
}
}
private fun versionOverrideFromProperty(versionCatalogBuilder: VersionCatalogBuilder, propertyName: String, propertiesFile: Properties): String {
val propertyValue = providers.systemProperty(propertyName).getOrElse(propertiesFile.getProperty(propertyName))
return versionCatalogBuilder.version(propertyName, propertyValue)
}
private fun versionOverrideFromProperties(versionCatalogBuilder: VersionCatalogBuilder, properties: Properties) {
versionOverrideFromProperty(versionCatalogBuilder, "gemfireVersion", properties)
versionOverrideFromProperty(versionCatalogBuilder, "springDataGemFireVersion", properties)
versionOverrideFromProperty(versionCatalogBuilder, "springIntegrationVersion", properties)
}