From fcb2f4ae72bdc62df37e61360d2d206c36717612 Mon Sep 17 00:00:00 2001 From: aSemy <897017+aSemy@users.noreply.github.com> Date: Tue, 25 Apr 2023 22:27:35 +0200 Subject: Tidy/remove unnecessary imports and suppressions (#2975) --- core/build.gradle.kts | 1 - .../main/kotlin/matchers/content/ContentMatchersDsl.kt | 1 - core/src/main/kotlin/configuration.kt | 15 ++++++++------- core/src/main/kotlin/defaultExternalLinks.kt | 1 - core/src/main/kotlin/links/DRI.kt | 1 - 5 files changed, 8 insertions(+), 11 deletions(-) (limited to 'core') 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>().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 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 -- cgit