-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.gradle.kts
58 lines (50 loc) · 1.7 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
50
51
52
53
54
55
56
57
58
pluginManagement {
repositories {
gradlePluginPortal()
jcenter()
google()
}
val kotlinVersion: String by settings
val androidGradleVersion: String by settings
val atomicfuVersion: String by settings
resolutionStrategy {
eachPlugin {
when {
requested.id.id == "kotlinx-atomicfu" ->
useModule("org.jetbrains.kotlinx:atomicfu-gradle-plugin:$atomicfuVersion")
requested.id.id.startsWith("org.jetbrains.kotlin") -> useVersion(kotlinVersion)
requested.id.id.startsWith("com.android") ->
useModule("com.android.tools.build:gradle:$androidGradleVersion")
}
}
}
val gitVersionPlugin: String by settings
val dokkaVersion: String by settings
val ktlintVersion: String by settings
plugins {
id("com.gladed.androidgitversion") version gitVersionPlugin
id("org.jetbrains.dokka") version dokkaVersion
id("org.jlleitschuh.gradle.ktlint") version ktlintVersion
}
}
rootProject.name = "kommon"
val prefix = "${rootProject.name}-"
val kotlinProjects: List<String> = listOf(
)
val androidProjects: List<String> = listOf(
"log",
"delegates",
"state",
"concurrent"
)
val projectNames = (kotlinProjects + androidProjects).toSet().toList()
fun subproject(name: String) {
include(":${rootProject.name}-$name")
project(":${rootProject.name}-$name").projectDir = file("modules/$name")
}
subproject("bom")
projectNames.forEach { subproject(it) }
gradle.allprojects {
extra["kotlinProjects"] = projectNames
extra["isAndroid"] = name.startsWith(prefix) && name.removePrefix(prefix) in androidProjects
}