-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
60 lines (50 loc) · 2.15 KB
/
build.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
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnLockMismatchReport
import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension
/*
* This is the root project.
*
* The root project should remain empty. Code, etc, should happen in subprojects, and the root project should only delegate
* work to subprojects.
*
* In particular, *avoid using the 'allprojects' and 'subprojects' Gradle blocks!* They slow down the configuration phase.
*/
plugins {
alias(opensavvyConventions.plugins.base)
alias(opensavvyConventions.plugins.root)
// Some plugins *must* be configured on the root project.
// In these cases, we explicitly tell Gradle not to apply them.
alias(opensavvyConventions.plugins.aligned.kotlin) apply false
}
dependencies {
// List the 'library' projects
dokkatoo(projects.backbone)
dokkatoo(projects.cacheBlocking)
dokkatoo(projects.cache)
dokkatoo(projects.logger)
dokkatoo(projects.progress)
dokkatoo(projects.progressCoroutines)
dokkatoo(projects.state)
dokkatoo(projects.stateArrow)
dokkatoo(projects.stateCoroutines)
dokkatoo(projects.weak)
kover(projects.backbone)
kover(projects.cache)
kover(projects.cacheBlocking)
kover(projects.progress)
kover(projects.progressCoroutines)
kover(projects.state)
kover(projects.stateCoroutines)
}
// region Check the users of the project didn't forget to rename the group
val projectPath: String? = System.getenv("CI_PROJECT_PATH")
if (projectPath != null && projectPath != "opensavvy/playgrounds/gradle" && group == "dev.opensavvy.playground") {
error("The project is declared to be in the group '$group', which is recognized as the Gradle Playground, but it's hosted in '$projectPath', which is not the Playground. Maybe you forgot to rename the group when importing the Playground in your own project?")
}
// endregion
// region Always ignore the yarn.lock file
// See https://kotlinlang.org/docs/js-project-setup.html#reporting-that-yarn-lock-has-been-updated
plugins.withType(org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin::class.java) {
the<YarnRootExtension>().yarnLockMismatchReport = YarnLockMismatchReport.NONE
the<YarnRootExtension>().yarnLockAutoReplace = true
}
// endregion