aboutsummaryrefslogtreecommitdiff
path: root/runners
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-08-13 19:54:42 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-14 17:51:11 +0200
commite3bf37c0ef8c88755f1d2d15d3ba6d07d649e005 (patch)
treebacc8f11a07b781e61a0dac3612ce0f3b43c2a1d /runners
parentb29a136721e28e0d6ca5c39d9180020e444b9d30 (diff)
downloaddokka-e3bf37c0ef8c88755f1d2d15d3ba6d07d649e005.tar.gz
dokka-e3bf37c0ef8c88755f1d2d15d3ba6d07d649e005.tar.bz2
dokka-e3bf37c0ef8c88755f1d2d15d3ba6d07d649e005.zip
Use List for representing classpaths instead of Set
Diffstat (limited to 'runners')
-rw-r--r--runners/cli/src/main/kotlin/cli/main.kt6
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt2
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt2
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTaskTest.kt2
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt2
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt6
9 files changed, 12 insertions, 14 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt
index 4b0bd04e..a9177ce7 100644
--- a/runners/cli/src/main/kotlin/cli/main.kt
+++ b/runners/cli/src/main/kotlin/cli/main.kt
@@ -36,14 +36,12 @@ class GlobalArguments(args: Array<String>) : DokkaConfiguration {
description = "Configuration for plugins in format fqPluginName=json^^fqPluginName=json..."
).default(emptyMap())
- private val pluginsClasspathList by parser.option(
+ override val pluginsClasspath by parser.option(
ArgTypeFile,
fullName = "pluginsClasspath",
description = "List of jars with dokka plugins (allows many paths separated by the semicolon `;`)"
).delimiter(";")
- override val pluginsClasspath: Set<File> by lazy { pluginsClasspathList.toMutableSet() }
-
override val offlineMode by parser.option(
ArgType.Boolean,
"Offline mode (do not download package lists from the Internet)"
@@ -223,7 +221,7 @@ private fun parseSourceSet(args: Array<String>): DokkaConfiguration.DokkaSourceS
override val moduleDisplayName = moduleDisplayName ?: moduleName
override val displayName = displayName
override val sourceSetID = DokkaSourceSetID(moduleName, sourceSetName)
- override val classpath = classpath.toMutableSet()
+ override val classpath = classpath.toMutableList()
override val sourceRoots = sourceRoots.toMutableSet()
override val dependentSourceSets = dependentSourceSets
.map { dependentSourceSetName -> dependentSourceSetName.split('/').let { DokkaSourceSetID(it[0], it[1]) } }
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt
index 37571fc5..e1ad4e3b 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt
@@ -15,7 +15,7 @@ open class DokkaCollectorTask : AbstractDokkaParentTask() {
cacheRoot = cacheRoot.getSafe(),
failOnWarning = failOnWarning.getSafe(),
offlineMode = offlineMode.getSafe(),
- pluginsClasspath = plugins.resolve().toSet(),
+ pluginsClasspath = plugins.resolve().toList(),
)
val subprojectDokkaConfigurations = childDokkaTasks.map { dokkaTask -> dokkaTask.buildDokkaConfiguration() }
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt
index f6690c3b..800dfe1b 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTask.kt
@@ -57,7 +57,7 @@ open class DokkaMultiModuleTask : AbstractDokkaParentTask(DokkaMultimoduleBootst
pluginsConfiguration = pluginsConfiguration.getSafe(),
failOnWarning = failOnWarning.getSafe(),
offlineMode = offlineMode.getSafe(),
- pluginsClasspath = plugins.resolve().toSet(),
+ pluginsClasspath = plugins.resolve().toList(),
modules = childDokkaTasks.map { dokkaTask ->
DokkaModuleDescriptionImpl(
name = dokkaTask.project.name,
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
index 6f92abdf..00bd43d7 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt
@@ -32,7 +32,7 @@ open class DokkaTask : AbstractDokkaTask(DokkaBootstrapImpl::class) {
failOnWarning = failOnWarning.getSafe(),
sourceSets = dokkaSourceSets.build(),
pluginsConfiguration = pluginsConfiguration.getSafe(),
- pluginsClasspath = plugins.resolve()
+ pluginsClasspath = plugins.resolve().toList()
)
}
}
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt
index 8a944837..5ec21988 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt
@@ -6,7 +6,7 @@ import java.io.File
internal fun GradleDokkaSourceSetBuilder.toDokkaSourceSetImpl(): DokkaSourceSetImpl {
return DokkaSourceSetImpl(
- classpath = classpath.toSet(),
+ classpath = classpath.toList(),
moduleDisplayName = moduleNameOrDefault(),
displayName = displayNameOrDefault(),
sourceSetID = sourceSetID,
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt
index d8545ab3..13ba9622 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/ConfigureWithKotlinSourceSetGistTest.kt
@@ -46,7 +46,7 @@ class ConfigureWithKotlinSourceSetGistTest {
)
assertEquals(
- setOf(f1Jar, f2Jar), sourceSet.build().classpath,
+ listOf(f1Jar, f2Jar), sourceSet.build().classpath,
"Expected classpath being present"
)
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTaskTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTaskTest.kt
index d7f0e946..7885cea1 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTaskTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTaskTest.kt
@@ -54,7 +54,7 @@ class DokkaCollectorTaskTest {
.map { it.sourceSets }
.reduce { acc, list -> acc + list },
pluginsClasspath = task.childDokkaTasks
- .map { it.plugins.resolve() }
+ .map { it.plugins.resolve().toList() }
.reduce { acc, mutableSet -> acc + mutableSet }
),
dokkaConfiguration
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
index 1e444d80..62c867ba 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaMultiModuleTaskTest.kt
@@ -73,7 +73,7 @@ class DokkaMultiModuleTaskTest {
outputDir = task.project.buildDir.resolve("customOutputDirectory"),
cacheRoot = File("customCacheRoot"),
pluginsConfiguration = mapOf("pluginA" to "configA"),
- pluginsClasspath = emptySet(),
+ pluginsClasspath = emptyList(),
failOnWarning = true,
offlineMode = true,
modules = listOf(
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index ce68a671..781f7cf2 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -193,7 +193,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
moduleDisplayName = moduleDisplayName.takeIf(String::isNotBlank) ?: moduleName,
displayName = displayName,
sourceSetID = DokkaSourceSetID(moduleName, sourceSetName),
- classpath = classpath.map(::File).toSet(),
+ classpath = classpath.map(::File),
sourceRoots = sourceDirectories.map(::File).toSet(),
dependentSourceSets = emptySet(),
samples = samples.map(::File).toSet(),
@@ -268,7 +268,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
groupId: String,
artifactId: String,
version: String
- ): Set<File> {
+ ): List<File> {
val repoSystem: RepositorySystem = newRepositorySystem()
val session: RepositorySystemSession = newSession(repoSystem)
val dependency =
@@ -293,7 +293,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
repoSystem.resolveDependencies(session, dependencyRequest)
val nlg = PreorderNodeListGenerator()
node.accept(nlg)
- return nlg.files.toSet()
+ return nlg.files
}
private val dokkaVersion: String by lazy {