diff --git a/docs/src/doc/docs/user_guide/cli/usage.md b/docs/src/doc/docs/user_guide/cli/usage.md index e77c686e8d..862b161bfe 100644 --- a/docs/src/doc/docs/user_guide/cli/usage.md +++ b/docs/src/doc/docs/user_guide/cli/usage.md @@ -20,6 +20,7 @@ Dokka supports the following command line arguments: * `-globalPackageOptions` - per package options added to all source sets * `-globalLinks` - external documentation links added to all source sets * `-globalSrcLink` - source links added to all source sets + * `-noSuppressObviousFunctions` - don't suppress obvious functions like default `toString` or `equals` * `-sourceSet` - (repeatable) - configuration for a single source set. Following this argument, you can pass other arguments: * `-sourceSetName` - source set name as a part of source set ID when declaring dependent source sets * `-displayName` - source set name displayed in the generated documentation diff --git a/docs/src/doc/docs/user_guide/gradle/usage.md b/docs/src/doc/docs/user_guide/gradle/usage.md index ff5a54f573..7a7761af47 100644 --- a/docs/src/doc/docs/user_guide/gradle/usage.md +++ b/docs/src/doc/docs/user_guide/gradle/usage.md @@ -89,6 +89,10 @@ dokkaHtml { // to enable package-list caching // When this is set to default, caches are stored in $USER_HOME/.cache/dokka cacheRoot.set(file("default")) + + // Suppress obvious functions like default toString or equals. Defaults to true + suppressObviousFunctions.set(false) + dokkaSourceSets { configureEach { // Or source set name, for single-platform the default source sets are `main` and `test` diff --git a/docs/src/doc/docs/user_guide/maven/usage.md b/docs/src/doc/docs/user_guide/maven/usage.md index feb53048ce..dec0712cd6 100644 --- a/docs/src/doc/docs/user_guide/maven/usage.md +++ b/docs/src/doc/docs/user_guide/maven/usage.md @@ -84,7 +84,10 @@ The available configuration options are shown below: src/test/samples - + + + false + 6 diff --git a/integration-tests/gradle/projects/it-basic/build.gradle.kts b/integration-tests/gradle/projects/it-basic/build.gradle.kts index e21b9c2ad3..414037fe19 100644 --- a/integration-tests/gradle/projects/it-basic/build.gradle.kts +++ b/integration-tests/gradle/projects/it-basic/build.gradle.kts @@ -48,5 +48,7 @@ tasks.withType { kotlinSourceSet(kotlin.sourceSets["test"]) } } + suppressObviousFunctions.set(false) + pluginsMapConfiguration.set(mapOf(DokkaBase::class.qualifiedName to """{ "customStyleSheets": ["${file("customResources/logo-styles.css")}", "${file("customResources/custom-style-to-add.css")}"], "customAssets" : ["${file("customResources/custom-resource.svg")}"] }""")) } diff --git a/integration-tests/maven/projects/it-maven/pom.xml b/integration-tests/maven/projects/it-maven/pom.xml index 17aafaf4b0..8c027d72b6 100644 --- a/integration-tests/maven/projects/it-maven/pom.xml +++ b/integration-tests/maven/projects/it-maven/pom.xml @@ -124,6 +124,8 @@ false + false + diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt index 6c1e6ab63a..ead7b9789d 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt @@ -43,6 +43,10 @@ abstract class AbstractDokkaTask : DefaultTask() { val failOnWarning: Property = project.objects.safeProperty() .safeConvention(DokkaDefaults.failOnWarning) + @Input + val suppressObviousFunctions: Property = project.objects.safeProperty() + .safeConvention(DokkaDefaults.suppressObviousFunctions) + @Input val offlineMode: Property = project.objects.safeProperty() .safeConvention(DokkaDefaults.offlineMode) diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt index 078ef9254a..0d6f35dad0 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt @@ -42,6 +42,7 @@ abstract class DokkaTask : AbstractDokkaTask() { failOnWarning = failOnWarning.getSafe(), sourceSets = unsuppressedSourceSets.build(), pluginsConfiguration = buildPluginsConfiguration(), - pluginsClasspath = plugins.resolve().toList() + pluginsClasspath = plugins.resolve().toList(), + suppressObviousFunctions = suppressObviousFunctions.getSafe(), ) } diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTaskPartial.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTaskPartial.kt index 0f509d3b18..c2789c1966 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTaskPartial.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTaskPartial.kt @@ -44,7 +44,8 @@ abstract class DokkaTaskPartial : AbstractDokkaTask() { sourceSets = unsuppressedSourceSets.build(), pluginsConfiguration = buildPluginsConfiguration(), pluginsClasspath = plugins.resolve().toList(), - delayTemplateSubstitution = true + delayTemplateSubstitution = true, + suppressObviousFunctions = suppressObviousFunctions.getSafe(), ) } } \ No newline at end of file diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt index 6ed433d049..3e1916a68e 100644 --- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt +++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt @@ -117,9 +117,6 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() - @Parameter var perPackageOptions: List = emptyList() @@ -159,6 +156,9 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List = emptyList() get() = field + defaultDokkaPlugins @@ -216,7 +216,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List