-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
73 lines (65 loc) · 2.35 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
61
62
63
64
65
66
67
68
69
70
71
72
73
plugins {
alias(libs.plugins.com.github.sghill.distribution.sha)
id("com.zegreatrob.jsmints.plugins.versioning")
alias(libs.plugins.nl.littlerobots.version.catalog.update)
alias(libs.plugins.com.zegreatrob.tools.tagger)
alias(libs.plugins.com.zegreatrob.tools.digger)
base
}
group = "com.zegreatrob.jsmints"
tagger {
releaseBranch = "master"
githubReleaseEnabled.set(true)
}
tasks {
val publishableBuilds = listOf(
gradle.includedBuild("libraries"),
gradle.includedBuild("plugins"),
)
val testBuilds = listOf(
gradle.includedBuild("libraries"),
gradle.includedBuild("plugins"),
) + gradle.includedBuild("wdio-testing-library-test")
val includedBuilds = testBuilds + gradle.includedBuild("convention-plugins")
val publish by registering {
mustRunAfter(check)
dependsOn(provider { publishableBuilds.map { it.task(":publish") } })
}
"versionCatalogUpdate" {
dependsOn(provider { includedBuilds.map { it.task(":versionCatalogUpdate") } })
}
register("kotlinUpgradeYarnLock") {
dependsOn(
provider {
listOf(
gradle.includedBuild("libraries"),
gradle.includedBuild("wdio-testing-library-test")
).map { it.task(":kotlinUpgradeYarnLock") }
}
)
}
register<Copy>("collectResults") {
dependsOn(provider { (getTasksByName("collectResults", true) - this).toList() })
dependsOn(provider { testBuilds.map { it.task(":collectResults") } })
from(testBuilds.map { it.projectDir.resolve("build/test-output") })
into(rootProject.layout.buildDirectory.dir("test-output/${project.path}".replace(":", "/")))
}
register("formatKotlin") {
dependsOn(provider { (getTasksByName("formatKotlin", true) - this).toList() })
dependsOn(provider { includedBuilds.map { it.task(":formatKotlin") } })
}
check {
dependsOn(provider { (getTasksByName("check", true) - this).toList() })
dependsOn(provider { includedBuilds.map { it.task(":check") } })
}
clean {
dependsOn(provider { includedBuilds.map { it.task(":clean") } })
}
release {
mustRunAfter(check)
finalizedBy(publish, currentContributionData)
}
currentContributionData {
mustRunAfter(tag)
}
}