aboutsummaryrefslogtreecommitdiff
path: root/runners/maven-plugin/src
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-07-13 19:43:12 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-07-15 11:42:35 +0200
commit6f04a8cfd6587b59f9ce62cfe575eafdc9f09501 (patch)
treedc3ac285458b290ad0101968868e42037763d193 /runners/maven-plugin/src
parente6184e5171d5a16bb4cc1fbd296309a66795eae5 (diff)
downloaddokka-6f04a8cfd6587b59f9ce62cfe575eafdc9f09501.tar.gz
dokka-6f04a8cfd6587b59f9ce62cfe575eafdc9f09501.tar.bz2
dokka-6f04a8cfd6587b59f9ce62cfe575eafdc9f09501.zip
Fix javadoc rendering
Diffstat (limited to 'runners/maven-plugin/src')
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt14
1 files changed, 12 insertions, 2 deletions
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index fdd1c646..5b904dce 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -166,7 +166,7 @@ abstract class AbstractDokkaMojo : AbstractMojo() {
var failOnWarning: Boolean = DokkaDefaults.failOnWarning
@Parameter
- var dokkaPlugins: List<Dependency> = emptyList()
+ open var dokkaPlugins: List<Dependency> = emptyList()
protected abstract fun getOutDir(): String
@@ -243,7 +243,7 @@ abstract class AbstractDokkaMojo : AbstractMojo() {
if (sourceSet.moduleDisplayName.isEmpty()) logger.warn("Not specified module name. It can result in unexpected behaviour while including documentation for module")
},
pluginsClasspath = getArtifactByAether("org.jetbrains.dokka", "dokka-base", dokkaVersion) +
- dokkaPlugins.map { getArtifactByAether(it.groupId, it.artifactId, it.version) }.flatten(),
+ dokkaPlugins.map { getArtifactByAether(it.groupId, it.artifactId, it.version ?: dokkaVersion) }.flatten(),
pluginsConfiguration = mutableMapOf(), //TODO implement as it is in Gradle
modules = emptyList(),
failOnWarning = failOnWarning
@@ -332,6 +332,9 @@ class DokkaMojo : AbstractDokkaMojo() {
class DokkaJavadocMojo : AbstractDokkaMojo() {
@Parameter(required = true, defaultValue = "\${project.basedir}/target/dokkaJavadoc")
var outputDir: String = ""
+
+ override var dokkaPlugins = super.dokkaPlugins + javadocDependency
+
override fun getOutDir() = outputDir
}
@@ -389,6 +392,8 @@ class DokkaJavadocJarMojo : AbstractDokkaMojo() {
override fun getOutDir() = outputDir
+ override var dokkaPlugins = super.dokkaPlugins + javadocDependency
+
override fun execute() {
super.execute()
if (!File(outputDir).exists()) {
@@ -415,3 +420,8 @@ class DokkaJavadocJarMojo : AbstractDokkaMojo() {
return javadocJar
}
}
+
+private val javadocDependency = Dependency().apply {
+ groupId = "org.jetbrains.dokka"
+ artifactId = "javadoc-plugin"
+}