diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-06-30 23:06:03 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-07-06 17:59:15 +0200 |
commit | b0e8622f374f6499058b0f083367b4a54512b702 (patch) | |
tree | 0fa641dc26bf1e7ed6497ee2340999e8ecc505ad /runners/maven-plugin/src | |
parent | b0b418334535adc60ee80c3df1b2293dfcaad071 (diff) | |
download | dokka-b0e8622f374f6499058b0f083367b4a54512b702.tar.gz dokka-b0e8622f374f6499058b0f083367b4a54512b702.tar.bz2 dokka-b0e8622f374f6499058b0f083367b4a54512b702.zip |
Enforce workspace unique SourceSetID
Diffstat (limited to 'runners/maven-plugin/src')
-rw-r--r-- | runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index 4c10568c..8160ab87 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -91,9 +91,6 @@ abstract class AbstractDokkaMojo : AbstractMojo() { var sourceRoots: List<SourceRoot> = emptyList() @Parameter - var dependentSourceSets: List<String> = emptyList() - - @Parameter var samples: List<String> = emptyList() @Parameter @@ -108,6 +105,9 @@ abstract class AbstractDokkaMojo : AbstractMojo() { @Parameter(required = true, defaultValue = "\${project.artifactId}") var moduleName: String = "" + @Parameter + var moduleDisplayName: String = "" + @Parameter(required = false, defaultValue = "false") var skip: Boolean = false @@ -201,12 +201,12 @@ abstract class AbstractDokkaMojo : AbstractMojo() { } val sourceSet = DokkaSourceSetImpl( - moduleName = moduleName, + moduleDisplayName = moduleDisplayName.takeIf(String::isNotBlank) ?: moduleName, displayName = displayName, - sourceSetID = sourceSetName, + sourceSetID = DokkaSourceSetID(moduleName, sourceSetName), classpath = classpath, sourceRoots = sourceDirectories.map { SourceRootImpl(it) }, - dependentSourceSets = dependentSourceSets, + dependentSourceSets = emptySet(), samples = samples, includes = includes, includeNonPublic = includeNonPublic, @@ -246,7 +246,7 @@ abstract class AbstractDokkaMojo : AbstractMojo() { offlineMode = offlineMode, cacheRoot = cacheRoot, 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") + 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(), |