aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle.kts1
-rw-r--r--core/build.gradle.kts1
-rw-r--r--core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt1
-rw-r--r--core/src/main/kotlin/configuration.kt15
-rw-r--r--core/src/main/kotlin/defaultExternalLinks.kt1
-rw-r--r--core/src/main/kotlin/links/DRI.kt1
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt5
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt18
-rw-r--r--plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt1
-rw-r--r--plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt1
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt2
-rw-r--r--plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt3
-rw-r--r--plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt1
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationReader.kt2
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DescriptionSections.kt3
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/parsers/InheritDocResolver.kt5
-rw-r--r--plugins/templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt1
-rw-r--r--plugins/templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt1
-rw-r--r--plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt3
-rw-r--r--plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt5
-rw-r--r--runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt1
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt2
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt3
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt3
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt4
26 files changed, 26 insertions, 60 deletions
diff --git a/build.gradle.kts b/build.gradle.kts
index 007f7375..0fa437e7 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,5 +1,4 @@
import org.jetbrains.ValidatePublications
-import org.jetbrains.kotlin.gradle.tasks.*
import org.jetbrains.publicationChannels
@Suppress("DSL_SCOPE_VIOLATION") // fixed in Gradle 8.1 https://github.com/gradle/gradle/pull/23639
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
index f18c6f14..1afed43d 100644
--- a/core/build.gradle.kts
+++ b/core/build.gradle.kts
@@ -1,5 +1,4 @@
import org.jetbrains.dokkaVersion
-import org.jetbrains.kotlin.gradle.tasks.*
import org.jetbrains.registerDokkaArtifactPublication
plugins {
diff --git a/core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt b/core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt
index 13780718..6e05c11a 100644
--- a/core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt
+++ b/core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt
@@ -3,7 +3,6 @@ package matchers.content
import assertk.assertThat
import assertk.assertions.contains
import assertk.assertions.isEqualTo
-import assertk.assertions.isNotNull
import org.jetbrains.dokka.model.withDescendants
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.test.tools.matchers.content.*
diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt
index 9bb81318..e9792f2d 100644
--- a/core/src/main/kotlin/configuration.kt
+++ b/core/src/main/kotlin/configuration.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka
import org.jetbrains.dokka.utilities.cast
@@ -108,11 +106,13 @@ data class GlobalDokkaConfiguration(
fun DokkaConfiguration.apply(globals: GlobalDokkaConfiguration): DokkaConfiguration = this.apply {
sourceSets.forEach {
- it.perPackageOptions.cast<MutableList<DokkaConfiguration.PackageOptions>>().addAll(globals.perPackageOptions ?: emptyList())
+ it.perPackageOptions.cast<MutableList<DokkaConfiguration.PackageOptions>>()
+ .addAll(globals.perPackageOptions ?: emptyList())
}
sourceSets.forEach {
- it.externalDocumentationLinks.cast<MutableSet<DokkaConfiguration.ExternalDocumentationLink>>().addAll(globals.externalDocumentationLinks ?: emptyList())
+ it.externalDocumentationLinks.cast<MutableSet<DokkaConfiguration.ExternalDocumentationLink>>()
+ .addAll(globals.externalDocumentationLinks ?: emptyList())
}
sourceSets.forEach {
@@ -173,6 +173,7 @@ interface DokkaConfiguration : Serializable {
val dependentSourceSets: Set<DokkaSourceSetID>
val samples: Set<File>
val includes: Set<File>
+
@Deprecated(message = "Use [documentedVisibilities] property for a more flexible control over documented visibilities")
val includeNonPublic: Boolean
val reportUndocumented: Boolean
@@ -237,6 +238,7 @@ interface DokkaConfiguration : Serializable {
interface PackageOptions : Serializable {
val matchingRegex: String
+
@Deprecated("Use [documentedVisibilities] property for a more flexible control over documented visibilities")
val includeNonPublic: Boolean
val reportUndocumented: Boolean?
@@ -253,6 +255,7 @@ interface DokkaConfiguration : Serializable {
}
}
+@Suppress("FunctionName")
fun ExternalDocumentationLink(
url: URL? = null,
packageListUrl: URL? = null
@@ -265,10 +268,8 @@ fun ExternalDocumentationLink(
throw IllegalArgumentException("url or url && packageListUrl must not be null for external documentation link")
}
-
+@Suppress("FunctionName")
fun ExternalDocumentationLink(
url: String, packageListUrl: String? = null
): ExternalDocumentationLinkImpl =
ExternalDocumentationLink(url.let(::URL), packageListUrl?.let(::URL))
-
-
diff --git a/core/src/main/kotlin/defaultExternalLinks.kt b/core/src/main/kotlin/defaultExternalLinks.kt
index e2a7432f..e39b557d 100644
--- a/core/src/main/kotlin/defaultExternalLinks.kt
+++ b/core/src/main/kotlin/defaultExternalLinks.kt
@@ -27,4 +27,3 @@ fun ExternalDocumentationLink.Companion.androidX(): ExternalDocumentationLinkImp
url = URL("https://developer.android.com/reference/kotlin/"),
packageListUrl = URL("https://developer.android.com/reference/kotlin/androidx/package-list")
)
-
diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt
index a1322ef6..c4ada6f8 100644
--- a/core/src/main/kotlin/links/DRI.kt
+++ b/core/src/main/kotlin/links/DRI.kt
@@ -1,6 +1,5 @@
package org.jetbrains.dokka.links
-import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonTypeInfo
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id.CLASS
import com.fasterxml.jackson.databind.ObjectMapper
diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt
index 6a6ff86a..acb7c71e 100644
--- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt
+++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/ConfigurationTest.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka.it.gradle
import org.gradle.testkit.runner.TaskOutcome
@@ -43,6 +41,7 @@ class ConfigurationTest(override val versions: BuildVersions) : AbstractGradleIn
* and `failOnWarning` are enabled - it should fail
*/
@Test
+ @Suppress("FunctionName")
fun `should fail with DokkaException and readable message if failOnWarning is triggered`() {
val result = createGradleRunner(
"-info",
@@ -58,7 +57,7 @@ class ConfigurationTest(override val versions: BuildVersions) : AbstractGradleIn
result.output.contains(
"""
FAILURE: Build failed with an exception\\.
-
+
\* What went wrong:
Execution failed for task ':dokkaHtml'\\.
> Failed with warningCount=\d and errorCount=\d
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt
index 64a583b6..27328a6c 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/KotlinAnalysis.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka.analysis
import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
@@ -9,6 +7,7 @@ import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.utilities.DokkaLogger
import java.io.Closeable
+@Suppress("FunctionName")
fun ProjectKotlinAnalysis(
sourceSets: List<DokkaSourceSet>,
logger: DokkaLogger,
@@ -30,6 +29,7 @@ fun ProjectKotlinAnalysis(
* Usually the analysis created for samples is short-lived and can be closed right after
* it's been used, there's no need to wait for [projectKotlinAnalysis] to be closed as it must be handled separately.
*/
+@Suppress("FunctionName")
fun SamplesKotlinAnalysis(
sourceSets: List<DokkaSourceSet>,
logger: DokkaLogger,
@@ -46,7 +46,7 @@ fun SamplesKotlinAnalysis(
sourceSet = sourceSet,
analysisConfiguration = analysisConfiguration
)
- }
+ }
return EnvironmentKotlinAnalysis(environments, projectKotlinAnalysis)
}
@@ -59,13 +59,15 @@ class DokkaAnalysisConfiguration(
val ignoreCommonBuiltIns: Boolean = false
)
-@Deprecated(message = "Construct using list of DokkaSourceSets and logger",
+@Deprecated(
+ message = "Construct using list of DokkaSourceSets and logger",
replaceWith = ReplaceWith("KotlinAnalysis(context.configuration.sourceSets, context.logger)")
)
fun KotlinAnalysis(context: DokkaContext): KotlinAnalysis =
ProjectKotlinAnalysis(context.configuration.sourceSets, context.logger)
-@Deprecated(message = "It was renamed to `ProjectKotlinAnalysis`",
+@Deprecated(
+ message = "It was renamed to `ProjectKotlinAnalysis`",
replaceWith = ReplaceWith("ProjectKotlinAnalysis(sourceSets, logger, analysisConfiguration)")
)
fun KotlinAnalysis(
@@ -85,11 +87,13 @@ abstract class KotlinAnalysis(
operator fun get(key: DokkaSourceSet): AnalysisContext {
return get(key.sourceSetID)
}
+
operator fun get(key: DokkaSourceSetID): AnalysisContext {
return find(key)
?: parent?.get(key)
- ?: throw IllegalStateException("Missing EnvironmentAndFacade for sourceSet ${key}")
+ ?: throw IllegalStateException("Missing EnvironmentAndFacade for sourceSet $key")
}
+
protected abstract fun find(sourceSetID: DokkaSourceSetID): AnalysisContext?
}
@@ -105,5 +109,3 @@ internal open class EnvironmentKotlinAnalysis(
environments.values.forEach(AnalysisContext::close)
}
}
-
-
diff --git a/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt b/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt
index fcb129ec..a8edfa88 100644
--- a/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt
+++ b/plugins/all-modules-page/src/main/kotlin/ExternalModuleLinkResolver.kt
@@ -5,7 +5,6 @@ import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.resolvers.shared.ExternalDocumentation
import org.jetbrains.dokka.base.resolvers.shared.PackageList
import org.jetbrains.dokka.base.resolvers.shared.PackageList.Companion.PACKAGE_LIST_NAME
-import org.jetbrains.dokka.base.resolvers.shared.RecognizedLinkFormat
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
diff --git a/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt b/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt
index f522fd4c..2901f361 100644
--- a/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt
+++ b/plugins/all-modules-page/src/main/kotlin/MultimodulePageCreator.kt
@@ -9,7 +9,6 @@ import org.jetbrains.dokka.base.parsers.moduleAndPackage.ModuleAndPackageDocumen
import org.jetbrains.dokka.base.parsers.moduleAndPackage.parseModuleAndPackageDocumentation
import org.jetbrains.dokka.base.parsers.moduleAndPackage.parseModuleAndPackageDocumentationFragments
import org.jetbrains.dokka.base.resolvers.anchors.SymbolAnchorHint
-import org.jetbrains.dokka.base.templating.InsertTemplateExtra
import org.jetbrains.dokka.base.transformers.pages.comments.DocTagToContentConverter
import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder
import org.jetbrains.dokka.links.DRI
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt
index f36071ff..fa6c653e 100644
--- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt
+++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/ModuleAndPackageDocumentationParsingContext.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka.base.parsers.moduleAndPackage
import org.jetbrains.dokka.analysis.DokkaResolutionFacade
diff --git a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt
index 5ef9d7ef..db342042 100644
--- a/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt
+++ b/plugins/base/src/main/kotlin/parsers/moduleAndPackage/parseModuleAndPackageDocumentation.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka.base.parsers.moduleAndPackage
fun parseModuleAndPackageDocumentation(
@@ -12,4 +10,3 @@ fun parseModuleAndPackageDocumentation(
documentation = context.parse(fragment)
)
}
-
diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
index d773650c..e0f80324 100644
--- a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
@@ -12,7 +12,6 @@ import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.querySingle
-import org.jetbrains.dokka.renderers.PostAction
import org.jetbrains.dokka.renderers.Renderer
import org.jetbrains.dokka.transformers.pages.PageTransformer
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationReader.kt b/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationReader.kt
index 37903988..faf94db2 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationReader.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationReader.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka.base.transformers.documentables
import org.jetbrains.dokka.DokkaConfiguration
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DescriptionSections.kt b/plugins/base/src/main/kotlin/translators/documentables/DescriptionSections.kt
index 8cd53525..35645a73 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DescriptionSections.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DescriptionSections.kt
@@ -14,7 +14,6 @@ import org.jetbrains.dokka.model.orEmpty
import org.jetbrains.dokka.model.properties.WithExtraProperties
import org.jetbrains.dokka.pages.ContentKind
import org.jetbrains.dokka.pages.ContentStyle
-import org.jetbrains.dokka.pages.SimpleAttr
import org.jetbrains.dokka.pages.TextStyle
import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
@@ -340,5 +339,3 @@ private fun PageContentBuilder.DocumentableContentBuilder.tableSectionContentBlo
private fun DRI.friendlyClassName() = classNames?.substringAfterLast(".")
private fun <T> Map<String, SourceSetDependent<T>>.availableSourceSets() = values.flatMap { it.keys }.toSet()
-
-
diff --git a/plugins/base/src/main/kotlin/translators/psi/parsers/InheritDocResolver.kt b/plugins/base/src/main/kotlin/translators/psi/parsers/InheritDocResolver.kt
index 67d0a718..e7f8c9ec 100644
--- a/plugins/base/src/main/kotlin/translators/psi/parsers/InheritDocResolver.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/parsers/InheritDocResolver.kt
@@ -6,9 +6,6 @@ import com.intellij.psi.PsiMethod
import com.intellij.psi.javadoc.PsiDocComment
import com.intellij.psi.javadoc.PsiDocTag
import org.jetbrains.dokka.utilities.DokkaLogger
-import org.jetbrains.kotlin.idea.refactoring.fqName.getKotlinFqName
-import org.jetbrains.kotlin.psi.KtElement
-import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
internal data class CommentResolutionContext(
val comment: PsiDocComment,
@@ -129,4 +126,4 @@ internal class InheritDocResolver(
baseMethod.findSuperMethods().filter { findClosestDocComment(it, logger)?.hasTag(javadocTag) == true }
private fun List<PsiElement>.withoutReferenceLink(): List<PsiElement> = drop(1)
-} \ No newline at end of file
+}
diff --git a/plugins/templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt b/plugins/templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt
index fdd9059d..22b5b00b 100644
--- a/plugins/templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt
+++ b/plugins/templating/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt
@@ -1,7 +1,6 @@
package org.jetbrains.dokka.templates
import org.jetbrains.dokka.DokkaConfiguration
-import org.jetbrains.dokka.plugability.DokkaContext
import java.io.File
class FallbackTemplateProcessingStrategy : TemplateProcessingStrategy {
diff --git a/plugins/templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt b/plugins/templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt
index 07238ea7..05f145af 100644
--- a/plugins/templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt
+++ b/plugins/templating/src/main/kotlin/templates/PackageListProcessingStrategy.kt
@@ -2,7 +2,6 @@ package org.jetbrains.dokka.allModulesPage.templates
import org.jetbrains.dokka.DokkaConfiguration.DokkaModuleDescription
import org.jetbrains.dokka.base.renderers.PackageListService
-import org.jetbrains.dokka.base.resolvers.local.DokkaLocationProvider
import org.jetbrains.dokka.base.resolvers.shared.PackageList
import org.jetbrains.dokka.base.resolvers.shared.PackageList.Companion.PACKAGE_LIST_NAME
import org.jetbrains.dokka.plugability.DokkaContext
diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt b/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt
index 719d2cf9..ff5722d0 100644
--- a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt
+++ b/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsNavigationCreator.kt
@@ -3,7 +3,6 @@ package org.jetbrains.dokka.versioning
import kotlinx.html.a
import kotlinx.html.div
import kotlinx.html.stream.appendHTML
-import org.jetbrains.dokka.base.renderers.html.strike
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.configuration
import org.jetbrains.dokka.plugability.plugin
@@ -83,4 +82,4 @@ class HtmlVersionsNavigationCreator(private val context: DokkaContext) : Version
versions.minByOrNull { (_, versionLocation) ->
versionLocation.let { position.toRelativeString(it).length }
}
-} \ No newline at end of file
+}
diff --git a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt b/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt
index f72e2df6..98f2e4ca 100644
--- a/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt
+++ b/plugins/versioning/src/main/kotlin/org/jetbrains/dokka/versioning/VersionsOrdering.kt
@@ -3,9 +3,6 @@ package org.jetbrains.dokka.versioning
import org.apache.maven.artifact.versioning.ComparableVersion
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.configuration
-import org.jetbrains.dokka.versioning.VersionId
-import org.jetbrains.dokka.versioning.VersioningConfiguration
-import org.jetbrains.dokka.versioning.VersioningPlugin
fun interface VersionsOrdering {
fun order(records: List<VersionId>): List<VersionId>
@@ -20,4 +17,4 @@ class ByConfigurationVersionOrdering(val dokkaContext: DokkaContext) : VersionsO
class SemVerVersionOrdering : VersionsOrdering {
override fun order(records: List<VersionId>): List<VersionId> =
records.map { it to ComparableVersion(it) }.sortedByDescending { it.second }.map { it.first }
-} \ No newline at end of file
+}
diff --git a/runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt b/runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt
index f52f72fd..c5f03a09 100644
--- a/runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt
+++ b/runners/cli/src/main/kotlin/org/jetbrains/dokka/CliArgumentTypes.kt
@@ -3,7 +3,6 @@ package org.jetbrains.dokka
import kotlinx.cli.ArgParser
import kotlinx.cli.ArgType
import kotlinx.cli.CLIEntity
-import org.jetbrains.dokka.utilities.LoggingLevel
import java.io.File
import java.nio.file.Paths
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt
index c853181d..a6148a64 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka.gradle
import org.gradle.api.Project
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt
index 65c0cd67..b32905ef 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaBootstrapFactory.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka.gradle
import org.gradle.api.artifacts.Configuration
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt
index 41cc19e3..052dab35 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/dokkaSourceSetIDFactory.kt
@@ -1,5 +1,3 @@
-@file:Suppress("FunctionName")
-
package org.jetbrains.dokka.gradle
import org.gradle.api.NamedDomainObjectFactory
@@ -10,6 +8,7 @@ internal fun DokkaSourceSetID(task: Task, sourceSetName: String): DokkaSourceSet
return DokkaSourceSetID(task.path, sourceSetName)
}
+@Suppress("FunctionName")
internal fun Task.DokkaSourceSetIdFactory() = NamedDomainObjectFactory<DokkaSourceSetID> { name ->
DokkaSourceSetID(this@DokkaSourceSetIdFactory, name)
}
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
index c555985b..75d184a2 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt
@@ -1,10 +1,9 @@
-@file:Suppress("TestFunctionName")
-
package org.jetbrains.dokka.gradle
import org.gradle.api.Project
import org.jetbrains.dokka.DokkaSourceSetID
+@Suppress("TestFunctionName")
fun GradleDokkaSourceSetBuilder(name: String, project: Project, sourceSetScopeId: String = "${project.path}:test"):
GradleDokkaSourceSetBuilder {
return GradleDokkaSourceSetBuilder(name, project) { DokkaSourceSetID(sourceSetScopeId, it) }
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
index b202fa3d..d5f92afe 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt
@@ -1,5 +1,3 @@
-@file:Suppress("TestFunctionName")
-
package org.jetbrains.dokka.gradle
import com.android.build.gradle.internal.api.DefaultAndroidSourceSet
@@ -13,7 +11,6 @@ import kotlin.test.*
class GradleDokkaSourceSetBuilderTest {
-
private val project = ProjectBuilder.builder().withName("root").build()
@Test
@@ -488,5 +485,6 @@ class GradleDokkaSourceSetBuilderTest {
}
}
+@Suppress("TestFunctionName")
private fun GradleDokkaSourceSetBuilder(name: String, project: Project) =
GradleDokkaSourceSetBuilder(name, project, project.path)