aboutsummaryrefslogtreecommitdiff
path: root/runners/maven-plugin/src/main/kotlin
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-03-13 10:46:33 +0100
committerBłażej Kardyś <bkardys@virtuslab.com>2020-03-23 13:57:07 +0100
commitc09bde34ff729ef9b1f3bea602fb53cd4e6dca42 (patch)
tree3a744a16c133b813ab1849761aef1ec3544f401f /runners/maven-plugin/src/main/kotlin
parentcedf8b7594deef2cd26e981865daa8aae0155520 (diff)
downloaddokka-c09bde34ff729ef9b1f3bea602fb53cd4e6dca42.tar.gz
dokka-c09bde34ff729ef9b1f3bea602fb53cd4e6dca42.tar.bz2
dokka-c09bde34ff729ef9b1f3bea602fb53cd4e6dca42.zip
Gradle Task supporting multimodular projects
Diffstat (limited to 'runners/maven-plugin/src/main/kotlin')
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt9
1 files changed, 7 insertions, 2 deletions
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index c84b97f4..cfe278ce 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -29,6 +29,7 @@ import org.eclipse.aether.transport.file.FileTransporterFactory
import org.eclipse.aether.transport.http.HttpTransporterFactory
import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator
import org.jetbrains.dokka.*
+import org.jetbrains.dokka.utilities.DokkaConsoleLogger
import java.io.File
import java.net.URL
@@ -219,18 +220,22 @@ abstract class AbstractDokkaMojo : AbstractMojo() {
includeRootPackage = includeRootPackage
)
+ val logger = MavenDokkaLogger(log)
+
val configuration = DokkaConfigurationImpl(
outputDir = getOutDir(),
format = getOutFormat(),
impliedPlatforms = impliedPlatforms,
cacheRoot = cacheRoot,
- passesConfigurations = listOf(passConfiguration),
+ passesConfigurations = listOf(passConfiguration).also {
+ if(passConfiguration.moduleName.isEmpty()) logger.warn("Not specified module name. It can result in unexpected behaviour while including documentation for module")
+ },
generateIndexPages = generateIndexPages,
pluginsClasspath = getArtifactByAether("org.jetbrains.dokka", "dokka-base", dokkaVersion) +
dokkaPlugins.map { getArtifactByAether(it.groupId, it.artifactId, it.version) }.flatten()
)
- val gen = DokkaGenerator(configuration, MavenDokkaLogger(log))
+ val gen = DokkaGenerator(configuration, logger)
gen.generate()
}