-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle.kts
50 lines (36 loc) 路 1.09 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// utils
enum class Os(val id: String) {
Linux("linux"),
Windows("windows"),
MacOS("macos")
}
val currentOs: Os by lazy {
val os = System.getProperty("os.name")
when {
os.equals("Mac OS X", ignoreCase = true) -> Os.MacOS
os.startsWith("Win", ignoreCase = true) -> Os.Windows
os.startsWith("Linux", ignoreCase = true) -> Os.Linux
else -> error("Unknown OS name: $os")
}
}
fun includeSubprojectsOf(root: String? = null, of: String) {
File(rootDir, if(root == null) of else "${root.replace(':', '/')}/$of").list { dir, name ->
File(dir, "$name/build.gradle.kts").exists()
}!!.forEach { include(if(root == null) ":$of:$it" else ":$root:$of:$it") }
}
// projects
includeSubprojectsOf(of = "ide")
include(":ide:platform:${currentOs.id}")
include(":ide:main:${currentOs.id}")
includeSubprojectsOf(of = "example")
includeBuild("includeBuild")
includeBuild("tools")
// flags
enableFeaturePreview("GRADLE_METADATA")
// plugins
pluginManagement {
repositories {
gradlePluginPortal()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") // Jetpack compose(org.jetbrains.compose)
}
}