-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle.kts
40 lines (36 loc) · 1.18 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
import java.time.Duration
plugins {
alias(buildlibs.plugins.nexus.publish)
id("io.codemodder.base")
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
transitionCheckOptions {
maxRetries.set(80) // default is 60 but we've been seeing timeouts
delayBetween.set(Duration.ofSeconds(30)) // default is 10 seconds
}
}
/*
In a composite build, running lifecycle tasks (such as check) from the root will not automatically
propagate to subprojects. See https://github.com/gradle/gradle/issues/20863
*/
val lifecycleTasks = listOf(
LifecycleBasePlugin.ASSEMBLE_TASK_NAME,
LifecycleBasePlugin.BUILD_TASK_NAME,
LifecycleBasePlugin.CHECK_TASK_NAME,
LifecycleBasePlugin.CLEAN_TASK_NAME,
"spotlessApply"
)
for (task in lifecycleTasks) {
tasks.register(task) {
group = "lifecycle"
description = "Runs the $task task for all included builds."
val tasks = gradle.includedBuilds.map {it.task(":$task") }
dependsOn(tasks)
}
}