From 8cb6efc97f8fa321381c95cc5f85a3ce7bc13c3f Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Fri, 19 Jun 2020 14:08:49 +0200 Subject: Remove SourceSetDataCache, rename PassConfiguration to DokkaSourceSet and use it instead of SourceSetData --- runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'runners/maven-plugin') diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index 1ef04772..b0baabee 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -29,7 +29,6 @@ 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.DokkaConfiguration.PackageOptions import java.io.File import java.net.URL @@ -187,7 +186,7 @@ abstract class AbstractDokkaMojo : AbstractMojo() { throw MojoExecutionException("Incorrect path property, only Unix based path allowed.") } } - fun defaultLinks(config: PassConfigurationImpl): List { + fun defaultLinks(config: DokkaSourceSetImpl): List { val links = mutableListOf() if (!config.noJdkLink) links += DokkaConfiguration.ExternalDocumentationLink @@ -201,7 +200,7 @@ abstract class AbstractDokkaMojo : AbstractMojo() { return links } - val passConfiguration = PassConfigurationImpl( + val sourceSet = DokkaSourceSetImpl( moduleName = moduleName, displayName = displayName, sourceSetID = sourceSetName, @@ -246,8 +245,8 @@ abstract class AbstractDokkaMojo : AbstractMojo() { format = getOutFormat(), offlineMode = offlineMode, cacheRoot = cacheRoot, - 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") + sourceSets = listOf(sourceSet).also { + if (sourceSet.moduleName.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(), -- cgit