-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
50 lines (42 loc) · 1.23 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
plugins {
base
id("org.jetbrains.dokka")
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.8.0"
alias(libs.plugins.release)
}
val isRelease = !version.toString().endsWith("-SNAPSHOT")
allprojects {
group = "io.facet"
description = "A Kotlin-friendly wrapper for Discord4J"
repositories {
mavenCentral()
}
}
tasks {
dokkaHtmlMultiModule {
dependsOn(clean)
outputDirectory.set(buildDir.resolve("docs"))
}
register("docs") {
dependsOn(dokkaHtmlMultiModule)
group = "documentation"
description = "Generate the KDocs for this project."
}
val updateReadme by registering(Copy::class) {
group = "release"
description = "Update the version number in the README.md at the root of the project."
onlyIf { isRelease && version.toString().let { "M" !in it && "RC" !in it } }
from(".github/README_TEMPLATE.md")
into(".")
rename { "README.md" }
expand("version" to version)
}
preTagCommit {
dependsOn(updateReadme)
}
}
release {
preTagCommitMessage = "Release version"
tagCommitMessage = "Release version"
newVersionCommitMessage = "Next development version"
}