diff options
author | aSemy <897017+aSemy@users.noreply.github.com> | 2023-04-25 22:27:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 22:27:35 +0200 |
commit | fcb2f4ae72bdc62df37e61360d2d206c36717612 (patch) | |
tree | fbcbfeae30e3d0ada54299b9f3d7db62a036ad75 /core | |
parent | 609c5469bbc0ba3516e760c6e61cf7df2b5c7ff7 (diff) | |
download | dokka-fcb2f4ae72bdc62df37e61360d2d206c36717612.tar.gz dokka-fcb2f4ae72bdc62df37e61360d2d206c36717612.tar.bz2 dokka-fcb2f4ae72bdc62df37e61360d2d206c36717612.zip |
Tidy/remove unnecessary imports and suppressions (#2975)
Diffstat (limited to 'core')
-rw-r--r-- | core/build.gradle.kts | 1 | ||||
-rw-r--r-- | core/content-matcher-test-utils/src/main/kotlin/matchers/content/ContentMatchersDsl.kt | 1 | ||||
-rw-r--r-- | core/src/main/kotlin/configuration.kt | 15 | ||||
-rw-r--r-- | core/src/main/kotlin/defaultExternalLinks.kt | 1 | ||||
-rw-r--r-- | core/src/main/kotlin/links/DRI.kt | 1 |
5 files changed, 8 insertions, 11 deletions
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 |