-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
41 lines (38 loc) · 1.24 KB
/
settings.gradle.kts
File metadata and controls
41 lines (38 loc) · 1.24 KB
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
35
36
37
38
39
40
41
pluginManagement {
includeBuild("build-logic")
repositories {
google()
gradlePluginPortal()
mavenCentral()
if (System.getenv("RUNNING_ON_CI") != "true") {
mavenLocal()
}
}
}
rootProject.name = "NativeBuilds"
val ignorePaths = mutableSetOf("build", "docs", "gradle", "src", "vcpkg", "vcpkg-tool", "vcpkg_installed")
if (System.getenv("WITH_WRAPPERS") != "true") {
ignorePaths.add("generated-kotlin-wrappers")
}
if (System.getenv("PUBLISHING") == "true" || System.getenv("WITH_WRAPPERS") == "true") {
ignorePaths.add("nativebuilds-loader")
ignorePaths.add("nativebuilds-gradle-plugin")
}
fun autoDetectModules(root: File) {
for (file in root.listFiles()) {
if (file.name.startsWith(".") || file.name in ignorePaths) {
continue
}
if (file.isDirectory) {
val children = file.list()
if ("settings.gradle.kts" in children) continue
if (children.any { it == "build.gradle.kts" }) {
include(":" + file.relativeTo(rootDir).path.replace("/", ":").replace("\\", ":"))
} else {
autoDetectModules(file)
}
}
}
}
autoDetectModules(rootDir)
includeBuild("example")