forked from micronaut-projects/micronaut-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
33 lines (27 loc) · 922 Bytes
/
build.gradle
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
plugins {
id "io.micronaut.build.internal.docs"
id "io.micronaut.build.internal.dependency-updates"
id "org.jetbrains.dokka" version "$kotlinVersion"
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion" apply false
}
tasks.named("dokkaHtmlMultiModule") {
outputDirectory.set(rootProject.layout.buildDirectory.dir("docs/api").map(d -> d.asFile))
}
task renameDokkaRootFile(type: Copy) {
from "${rootProject.buildDir}/docs/api/-modules.html"
into "${rootProject.buildDir}/docs/api/"
rename { String fileName ->
fileName.replace("-modules", "index")
}
}
renameDokkaRootFile.dependsOn(dokkaHtmlMultiModule)
docs.dependsOn(renameDokkaRootFile)
def prepareGuideHotfix = tasks.register("prepareGuideHotfix") {
doLast {
file("${buildDir}/doc-resources").mkdirs()
}
}
tasks.named('publishGuide') {
dependsOn(prepareGuideHotfix)
dependsOn(tasks.javadoc)
}