2024-08-27 12:57:59 +00:00
|
|
|
File templatesFolder = new File("$rootProject.projectDir.absolutePath${File.separatorChar}gradle${File.separatorChar}templates")
|
2020-09-15 12:57:41 +00:00
|
|
|
|
2024-08-27 12:57:59 +00:00
|
|
|
Map properties = new HashMap<String, String>()
|
2020-09-15 12:57:41 +00:00
|
|
|
|
2024-08-27 12:57:59 +00:00
|
|
|
if (templatesFolder.exists() && templatesFolder.isDirectory()) {
|
|
|
|
templatesFolder.listFiles().each {
|
|
|
|
properties[it.name - ".gradle"] = it.absolutePath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
properties["projectByName"] = { name ->
|
|
|
|
for (subproject in rootProject.subprojects) {
|
|
|
|
if (subproject.name == name) {
|
|
|
|
return subproject
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return null
|
|
|
|
}
|
2020-09-15 12:57:41 +00:00
|
|
|
|
2024-08-27 12:57:59 +00:00
|
|
|
properties["internalProject"] = { name ->
|
|
|
|
projectByName("$name")
|
|
|
|
}
|
2020-09-27 14:25:42 +00:00
|
|
|
|
2024-08-27 12:57:59 +00:00
|
|
|
allprojects {
|
|
|
|
ext {
|
|
|
|
releaseMode = (project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true"
|
2020-11-10 09:43:15 +00:00
|
|
|
|
2024-08-27 12:57:59 +00:00
|
|
|
properties.forEach { k, v ->
|
|
|
|
it[k] = v
|
|
|
|
}
|
2020-09-15 12:57:41 +00:00
|
|
|
}
|
|
|
|
}
|