Skip to content

Commit 9d3d08e

Browse files
committed
Update dokka configuration
1 parent 8deaf14 commit 9d3d08e

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
[![DOI](https://zenodo.org/badge/129486382.svg)](https://zenodo.org/badge/latestdoi/129486382)
33
![Gradle build](https://github.com/SciProgCentre/kmath/workflows/Gradle%20build/badge.svg)
44
[![Maven Central](https://img.shields.io/maven-central/v/space.kscience/kmath-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22space.kscience%22)
5-
[![Space](https://img.shields.io/badge/dynamic/xml?color=orange&label=Space&query=//metadata/versioning/latest&url=https%3A%2F%2Fmaven.pkg.jetbrains.space%2Fmipt-npm%2Fp%2Fsci%2Fmaven%2Fspace%2Fkscience%2Fkmath-core%2Fmaven-metadata.xml)](https://maven.pkg.jetbrains.space/mipt-npm/p/sci/maven/space/kscience/)
65

76
# KMath
87

build.gradle.kts

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ allprojects {
1717
version = "0.4.3-dev-1"
1818
}
1919

20-
dependencies{
20+
dependencies {
2121
subprojects.forEach {
2222
dokka(it)
2323
}
@@ -27,23 +27,29 @@ subprojects {
2727
if (name.startsWith("kmath")) apply<MavenPublishPlugin>()
2828

2929
plugins.withId("org.jetbrains.dokka") {
30-
tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial> {
31-
dependsOn(tasks["assemble"])
32-
33-
dokkaSourceSets.all {
34-
val readmeFile = this@subprojects.projectDir.resolve("README.md")
30+
dokka {
31+
dokkaSourceSets.configureEach {
32+
val readmeFile = projectDir.resolve("README.md")
3533
if (readmeFile.exists()) includes.from(readmeFile)
3634
val kotlinDirPath = "src/$name/kotlin"
3735
val kotlinDir = file(kotlinDirPath)
3836

3937
if (kotlinDir.exists()) sourceLink {
4038
localDirectory.set(kotlinDir)
41-
42-
remoteUrl.set(
43-
uri("https://github.com/SciProgCentre/kmath/tree/master/${this@subprojects.name}/$kotlinDirPath").toURL()
39+
remoteUrl(
40+
"https://github.com/SciProgCentre/kmath/tree/master/${name}/$kotlinDirPath"
4441
)
4542
}
4643

44+
fun externalDocumentationLink(url: String, packageListUrl: String? = null){
45+
externalDocumentationLinks.register(url) {
46+
url(url)
47+
packageListUrl?.let {
48+
packageListUrl(it)
49+
}
50+
}
51+
}
52+
4753
externalDocumentationLink("https://commons.apache.org/proper/commons-math/javadocs/api-3.6.1/")
4854
externalDocumentationLink("https://deeplearning4j.org/api/latest/")
4955
externalDocumentationLink("https://axelclk.bitbucket.io/symja/javadoc/")
@@ -54,11 +60,12 @@ subprojects {
5460
)
5561

5662
externalDocumentationLink(
57-
"https://breandan.net/kotlingrad/kotlingrad/",
58-
"https://breandan.net/kotlingrad/kotlingrad/kotlingrad/package-list",
63+
"https://breandan.net/kotlingrad/kotlingrad",
64+
"https://breandan.net/kotlingrad/package-list",
5965
)
6066
}
6167
}
68+
6269
}
6370
}
6471

0 commit comments

Comments
 (0)