-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
build.gradle.kts
53 lines (44 loc) · 1.46 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
import org.spongepowered.configurate.build.applyCommonAttributes
plugins {
kotlin("jvm") version "1.3.71" apply false
id("io.freefair.aggregate-javadoc-jar") version "5.0.0-rc6"
id("org.ajoberstar.grgit") version "4.0.2"
id("org.ajoberstar.git-publish") version "3.0.0-rc.1"
id("io.codearte.nexus-staging")
}
group = "org.spongepowered"
version = "3.7.2"
nexusStaging {
val spongeOssrhUsername: String? by project
val spongeOssrhPassword: String? by project
username = spongeOssrhUsername
password = spongeOssrhPassword
}
tasks.aggregateJavadoc.configure {
applyCommonAttributes()
title = "Configurate $version (all modules)"
val excludedProjects = listOf("examples").map {
project(":configurate-$it").tasks.named("javadoc", Javadoc::class).get().classpath
}
classpath = classpath.minus(files(excludedProjects))
}
gitPublish {
branch.set("gh-pages")
contents {
from("src/site") {
val versions = (listOf(project.version as String) + (grgit.tag.list().map { it.name }.reversed() - (project.version as String))).filter {
repoDir.get().dir(it).getAsFile().exists() || it == project.version
}
expand("project" to project, "versions" to versions)
}
from(tasks.aggregateJavadoc) {
into("$version/apidocs")
}
}
preserve {
include(".gitattributes")
include("**/") // include everything in directories
exclude("/*.html")
}
commitMessage.set("Publish javadocs (via gradle-git-publish)")
}