-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings.gradle.kts
91 lines (76 loc) · 2.14 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@file:Suppress("UnstableApiUsage")
import java.nio.file.Path
import kotlin.io.path.absolutePathString
import kotlin.io.path.exists
import kotlin.io.path.isDirectory
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
id("com.gradle.develocity") version "3.19.1"
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
rulesMode = RulesMode.PREFER_SETTINGS
}
rootProject.name = "kotlin-document-store"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
include(
":core",
":samples:js-http-client",
":samples:kmp-app",
":samples:ktor-server",
":stores:browser",
":stores:leveldb",
":stores:mvstore",
":tests",
":version-catalog",
)
val levelDbPath: Path = file("../kotlin-leveldb").toPath()
val localLeveldbExists = levelDbPath.isDirectory() && levelDbPath.resolve("settings.gradle.kts").exists()
val useLocalLevelDb: Boolean? by settings
if (localLeveldbExists && !isCi && useLocalLevelDb == true) {
includeBuild(levelDbPath.absolutePathString()) {
val endings = listOf(
"jvm",
"js",
"mingwx64",
"linuxx64",
"linuxarm64",
"macosx64",
"macosarm64",
"iosarm64",
"iosx64",
"iosSimulatorarm64",
"watchosarm64",
"watchosx64",
"watchosSimulatorarm64",
"tvosarm64",
"tvosx64",
"tvosSimulatorarm64",
"androidarm64",
"android",
"androidarm32",
"androidx86",
"androidx64"
)
dependencySubstitution {
substitute(module("com.github.lamba92:kotlin-leveldb")).using(project(":"))
endings.forEach {
substitute(module("com.github.lamba92:kotlin-leveldb-$it")).using(project(":"))
}
}
}
}
develocity {
buildScan {
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"
publishing {
onlyIf { isCi }
}
}
}
val isCi
get() = System.getenv("CI") == "true"