-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
45 lines (37 loc) · 1.17 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
import org.gradle.kotlin.dsl.support.listFilesOrdered
plugins {base
id("org.jetbrains.dokka")
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
}
val artifactVersion: String by extra
group = "at.asitplus"
version = artifactVersion
dependencies {
dokka(project(":kmmresult"))
dokka(project(":kmmresult-test"))
}
dokka {
val moduleDesc = File("$rootDir/dokka-tmp.md").also { it.createNewFile() }
val readme =
File("${rootDir}/README.md").readText()
moduleDesc.writeText("\n\n$readme")
moduleName.set("KmmResult")
dokkaPublicationDirectory.set(file("${rootDir}/docs"))
dokkaPublications.html {
includes.from(moduleDesc)
}
}
tasks.dokkaGenerate {
doLast {
rootDir.listFilesOrdered { it.extension.lowercase() == "png" || it.extension.lowercase() == "svg" }
.forEach { it.copyTo(File("$rootDir/docs/html/${it.name}"), overwrite = true) }
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}