-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
82 lines (67 loc) · 2.03 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
82 lines (67 loc) · 2.03 KB
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
group = "ski.gagar.vertigram"
repositories {
mavenCentral()
}
plugins {
id("org.jetbrains.dokka")
signing
alias(libsInternal.plugins.release)
alias(libsInternal.plugins.nexus)
}
dependencies {
dokkaPlugin(libsInternal.dokka.versioning.plugin)
}
buildscript {
dependencies {
classpath(libsInternal.dokka.versioning.plugin)
}
repositories {
mavenCentral()
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}
release {
with(git) {
requireBranch.set("master")
}
}
gradle.projectsEvaluated {
val publishToSonatypeTasks = subprojects.mapNotNull {
it.tasks.findByName("publishToSonatype")
}
tasks {
named("closeSonatypeStagingRepository") {
mustRunAfter(publishToSonatypeTasks)
}
named("closeAndReleaseSonatypeStagingRepository") {
mustRunAfter(publishToSonatypeTasks)
}
named("afterReleaseBuild") {
dependsOn(publishToSonatypeTasks)
if (providers.gradleProperty("vertigram.dokka.publish").orNull != "false") {
dependsOn(":vertigram-docs:dokkaPush")
}
when (val stagingAction = providers.gradleProperty("vertigram.staging.action").orNull ?: "none") {
"none" -> {}
"close" -> dependsOn("closeSonatypeStagingRepository")
"close-and-release" -> dependsOn("closeAndReleaseSonatypeStagingRepository")
else -> throw GradleException(
"Unsupported vertigram.staging.action=$stagingAction. " +
"Expected one of: none, close, close-and-release."
)
}
}
}
project(":vertigram-docs").tasks {
named("dokkaPush") {
mustRunAfter(publishToSonatypeTasks)
}
}
}