aboutsummaryrefslogtreecommitdiff
path: root/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-10-07 13:58:46 +0200
committerGitHub <noreply@github.com>2020-10-07 13:58:46 +0200
commite9f5da45c0fcfec5f7c150229301904d7915e090 (patch)
treec094b57b37fec4c901bbfaa508268d354a4dc4c8 /runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
parentde6019337ae0e97e73db7fa9394e88ec2de4aeed (diff)
downloaddokka-e9f5da45c0fcfec5f7c150229301904d7915e090.tar.gz
dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.tar.bz2
dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.zip
Make logo replaceable #1339 (#1488)
Diffstat (limited to 'runners/maven-plugin/src/main/kotlin/DokkaMojo.kt')
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt15
1 files changed, 13 insertions, 2 deletions
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index 89928b4c..b03d2811 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -12,6 +12,7 @@ import org.apache.maven.project.MavenProjectHelper
import org.apache.maven.repository.internal.MavenRepositorySystemUtils
import org.codehaus.plexus.archiver.Archiver
import org.codehaus.plexus.archiver.jar.JarArchiver
+import org.codehaus.plexus.util.xml.Xpp3Dom
import org.eclipse.aether.DefaultRepositorySystemSession
import org.eclipse.aether.RepositorySystem
import org.eclipse.aether.RepositorySystemSession
@@ -224,6 +225,16 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
val logger = MavenDokkaLogger(log)
+ val pluginsConfiguration =
+ (mavenProject?.getPlugin("org.jetbrains.dokka:dokka-maven-plugin")?.configuration as? Xpp3Dom)
+ ?.getChild("pluginsConfiguration")?.children?.map {
+ PluginConfigurationImpl(
+ it.name,
+ DokkaConfiguration.SerializationFormat.XML,
+ it.toString()
+ )
+ }.orEmpty()
+
val configuration = DokkaConfigurationImpl(
moduleName = moduleName,
outputDir = File(getOutDir()),
@@ -233,9 +244,9 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
pluginsClasspath = getArtifactByAether("org.jetbrains.dokka", "dokka-base", dokkaVersion) +
dokkaPlugins.map { getArtifactByAether(it.groupId, it.artifactId, it.version ?: dokkaVersion) }
.flatten(),
- pluginsConfiguration = mutableMapOf(), //TODO implement as it is in Gradle
+ pluginsConfiguration = pluginsConfiguration.toMutableList(),
modules = emptyList(),
- failOnWarning = failOnWarning
+ failOnWarning = failOnWarning,
)
val gen = DokkaGenerator(configuration, logger)