diff --git a/build.gradle.kts b/build.gradle.kts index 69c4497393..f3ee5df96e 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 ded27ec7aa..a51e3a62de 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 1378071875..6e05c11a60 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 9bb813181e..e9792f2da0 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>().addAll(globals.perPackageOptions ?: emptyList()) + it.perPackageOptions.cast>() + .addAll(globals.perPackageOptions ?: emptyList()) } sourceSets.forEach { - it.externalDocumentationLinks.cast>().addAll(globals.externalDocumentationLinks ?: emptyList()) + it.externalDocumentationLinks.cast>() + .addAll(globals.externalDocumentationLinks ?: emptyList()) } sourceSets.forEach { @@ -173,6 +173,7 @@ interface DokkaConfiguration : Serializable { val dependentSourceSets: Set val samples: Set val includes: Set + @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 e2a7432f53..e39b557d17 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 a1322ef6f7..c4ada6f865 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 6a6ff86a29..acb7c71e8d 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 64a583b62a..27328a6ce6 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, 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, 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 fcb129ec58..a8edfa885f 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 f522fd4ca2..2901f361f5 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 f36071ff27..fa6c653ef3 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 5ef9d7efbb..db3420429a 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 d773650cd3..e0f803245c 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 379039883a..faf94db231 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 8cd53525e5..35645a73ac 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 Map>.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 67d0a7185d..e7f8c9ecb6 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.withoutReferenceLink(): List = 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 fdd9059d46..22b5b00b61 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 07238ea7dc..05f145af06 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 719d2cf91f..ff5722d05d 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 f72e2df6f5..98f2e4ca67 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): List @@ -20,4 +17,4 @@ class ByConfigurationVersionOrdering(val dokkaContext: DokkaContext) : VersionsO class SemVerVersionOrdering : VersionsOrdering { override fun order(records: List): List = 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 f52f72fd0c..c5f03a0910 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 c853181d7e..a6148a6459 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 65c0cd6712..b32905ef7b 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 41cc19e31f..052dab35b7 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 { 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 c555985b2c..75d184a2d7 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 b202fa3dcf..d5f92afe26 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)