diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-07-22 11:12:16 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-14 17:51:11 +0200 |
commit | 37d12bed40edc226d96d0e1a4b28a24583ece94f (patch) | |
tree | 424ec0e7f60fc9a9c0eb9a9747a99faea714fdf9 /testApi/src | |
parent | eae1ce49d18c2978b49166ea502bf2c109a85504 (diff) | |
download | dokka-37d12bed40edc226d96d0e1a4b28a24583ece94f.tar.gz dokka-37d12bed40edc226d96d0e1a4b28a24583ece94f.tar.bz2 dokka-37d12bed40edc226d96d0e1a4b28a24583ece94f.zip |
DokkaConfiguration: Use `Set` instead of `List` when collections are expected to be distinct
Diffstat (limited to 'testApi/src')
-rw-r--r-- | testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt index 6d80d15a..034b945f 100644 --- a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt +++ b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt @@ -66,14 +66,12 @@ abstract class AbstractCoreTest( outputDir = testDirPath.toFile(), sourceSets = configuration.sourceSets.map { sourceSet -> sourceSet.copy( - sourceRoots = sourceSet.sourceRoots.map { sourceRoot -> - sourceRoot.copy( - directory = testDirPath.toFile().resolve(sourceRoot.directory) - ) - }, + sourceRoots = sourceSet.sourceRoots.map { file -> + testDirPath.toFile().resolve(file) + }.toSet(), suppressedFiles = sourceSet.suppressedFiles.map { file -> testDirPath.toFile().resolve(file) - } + }.toSet() ) } ) @@ -176,8 +174,8 @@ abstract class AbstractCoreTest( outputDir = File(outputDir), cacheRoot = cacheRoot?.let(::File), offlineMode = offlineMode, - sourceSets = sourceSets, - pluginsClasspath = pluginsClasspath, + sourceSets = sourceSets.toList(), + pluginsClasspath = pluginsClasspath.toSet(), pluginsConfiguration = pluginsConfigurations, modules = emptyList(), failOnWarning = failOnWarning @@ -225,25 +223,25 @@ abstract class AbstractCoreTest( moduleDisplayName = moduleDisplayName ?: moduleName, displayName = displayName, sourceSetID = DokkaSourceSetID(moduleName, name), - classpath = classpath.map(::File), - sourceRoots = sourceRoots.map(::File).map(::SourceRootImpl), + classpath = classpath.map(::File).toSet(), + sourceRoots = sourceRoots.map(::File).toSet(), dependentSourceSets = dependentSourceSets, - samples = samples.map(::File), - includes = includes.map(::File), + samples = samples.map(::File).toSet(), + includes = includes.map(::File).toSet(), includeNonPublic = includeNonPublic, includeRootPackage = includeRootPackage, reportUndocumented = reportUndocumented, skipEmptyPackages = skipEmptyPackages, skipDeprecated = skipDeprecated, jdkVersion = jdkVersion, - sourceLinks = sourceLinks, - perPackageOptions = perPackageOptions, - externalDocumentationLinks = externalDocumentationLinks, + sourceLinks = sourceLinks.toSet(), + perPackageOptions = perPackageOptions.toList(), + externalDocumentationLinks = externalDocumentationLinks.toSet(), languageVersion = languageVersion, apiVersion = apiVersion, noStdlibLink = noStdlibLink, noJdkLink = noJdkLink, - suppressedFiles = suppressedFiles.map(::File), + suppressedFiles = suppressedFiles.map(::File).toSet(), analysisPlatform = Platform.fromString(analysisPlatform) ) } |