aboutsummaryrefslogtreecommitdiff
path: root/core/test-api
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat@beresnev.me>2021-12-23 14:32:18 +0300
committerGitHub <noreply@github.com>2021-12-23 14:32:18 +0300
commitbfd41ce2a0d43419a671961c19b7d755cffdcfc8 (patch)
tree00d1fcd75ff7c25de20c8b0621e3bfb11cd3f61a /core/test-api
parent5c98d42ec08ca1413f920e4f5dde28d330e8837a (diff)
downloaddokka-bfd41ce2a0d43419a671961c19b7d755cffdcfc8.tar.gz
dokka-bfd41ce2a0d43419a671961c19b7d755cffdcfc8.tar.bz2
dokka-bfd41ce2a0d43419a671961c19b7d755cffdcfc8.zip
Introduce documentedVisibilities setting (#2270)
* Introduce `documentedVisibilities` setting * Remove hardcoded doc generation for Visibility.PUBLIC, correct tests * Add maven, gradle and cli integration tests for documentedVisibilities * Fix maven plugin configuration overriding the default value * Remove test debug prints * Correct an inconsistency with default values and leave a comment of intentions * Add a test for visibility of private setter
Diffstat (limited to 'core/test-api')
-rw-r--r--core/test-api/api/test-api.api6
-rw-r--r--core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt4
2 files changed, 8 insertions, 2 deletions
diff --git a/core/test-api/api/test-api.api b/core/test-api/api/test-api.api
index b1f6a381..83335672 100644
--- a/core/test-api/api/test-api.api
+++ b/core/test-api/api/test-api.api
@@ -83,14 +83,15 @@ public abstract interface annotation class testApi/testRunner/DokkaConfiguration
}
public final class testApi/testRunner/DokkaSourceSetBuilder {
- public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Set;Ljava/util/List;Ljava/util/List;ZZZZILjava/lang/String;Ljava/lang/String;ZZLjava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V
- public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Set;Ljava/util/List;Ljava/util/List;ZZZZILjava/lang/String;Ljava/lang/String;ZZLjava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
+ public fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Set;Ljava/util/List;Ljava/util/List;ZLjava/util/Set;ZZZILjava/lang/String;Ljava/lang/String;ZZLjava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V
+ public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/Set;Ljava/util/List;Ljava/util/List;ZLjava/util/Set;ZZZILjava/lang/String;Ljava/lang/String;ZZLjava/util/List;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun build ()Lorg/jetbrains/dokka/DokkaSourceSetImpl;
public final fun getAnalysisPlatform ()Ljava/lang/String;
public final fun getApiVersion ()Ljava/lang/String;
public final fun getClasspath ()Ljava/util/List;
public final fun getDependentSourceSets ()Ljava/util/Set;
public final fun getDisplayName ()Ljava/lang/String;
+ public final fun getDocumentedVisibilities ()Ljava/util/Set;
public final fun getExternalDocumentationLinks ()Ljava/util/List;
public final fun getIncludeNonPublic ()Z
public final fun getIncludes ()Ljava/util/List;
@@ -112,6 +113,7 @@ public final class testApi/testRunner/DokkaSourceSetBuilder {
public final fun setClasspath (Ljava/util/List;)V
public final fun setDependentSourceSets (Ljava/util/Set;)V
public final fun setDisplayName (Ljava/lang/String;)V
+ public final fun setDocumentedVisibilities (Ljava/util/Set;)V
public final fun setExternalDocumentationLinks (Ljava/util/List;)V
public final fun setIncludeNonPublic (Z)V
public final fun setIncludes (Ljava/util/List;)V
diff --git a/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt b/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt
index 33f45b02..804e02ce 100644
--- a/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt
+++ b/core/test-api/src/main/kotlin/testApi/testRunner/TestDokkaConfigurationBuilder.kt
@@ -88,7 +88,9 @@ class DokkaSourceSetBuilder(
var dependentSourceSets: Set<DokkaSourceSetID> = emptySet(),
var samples: List<String> = emptyList(),
var includes: List<String> = emptyList(),
+ @Deprecated(message = "Use [documentedVisibilities] property for a more flexible control over documented visibilities")
var includeNonPublic: Boolean = false,
+ var documentedVisibilities: Set<DokkaConfiguration.Visibility> = DokkaDefaults.documentedVisibilities,
var reportUndocumented: Boolean = false,
var skipEmptyPackages: Boolean = false,
var skipDeprecated: Boolean = false,
@@ -112,6 +114,7 @@ class DokkaSourceSetBuilder(
samples = samples.map(::File).toSet(),
includes = includes.map(::File).toSet(),
includeNonPublic = includeNonPublic,
+ documentedVisibilities = documentedVisibilities,
reportUndocumented = reportUndocumented,
skipEmptyPackages = skipEmptyPackages,
skipDeprecated = skipDeprecated,
@@ -137,6 +140,7 @@ val defaultSourceSet = DokkaSourceSetImpl(
samples = emptySet(),
includes = emptySet(),
includeNonPublic = false,
+ documentedVisibilities = DokkaDefaults.documentedVisibilities,
reportUndocumented = false,
skipEmptyPackages = true,
skipDeprecated = false,