aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main/kotlin/main.kt
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/main.kt')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/main.kt23
1 files changed, 20 insertions, 3 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt
index 7aa871ad..60311fff 100644
--- a/runners/gradle-plugin/src/main/kotlin/main.kt
+++ b/runners/gradle-plugin/src/main/kotlin/main.kt
@@ -82,6 +82,8 @@ open class DokkaTask : DefaultTask() {
@Input var skipDeprecated = false
@Input var skipEmptyPackages = true
@Input var reportNotDocumented = true
+ @Input var perPackageOptions: MutableList<PackageOptions> = arrayListOf()
+ @Input var impliedPlatforms: MutableList<String> = arrayListOf()
protected open val sdkProvider: SdkProvider? = null
@@ -108,6 +110,13 @@ open class DokkaTask : DefaultTask() {
sourceRoots.add(sourceRoot)
}
+ fun packageOptions(closure: Closure<Any?>) {
+ val packageOptions = PackageOptions()
+ closure.delegate = packageOptions
+ closure.call()
+ perPackageOptions.add(packageOptions)
+ }
+
fun tryResolveFatJar(project: Project): File {
return try {
val dependency = project.buildscript.dependencies.create(dokkaFatJar)
@@ -172,9 +181,11 @@ open class DokkaTask : DefaultTask() {
reportNotDocumented,
skipEmptyPackages,
skipDeprecated,
- 6,
+ jdkVersion,
true,
- linkMappings)
+ linkMappings,
+ impliedPlatforms,
+ perPackageOptions)
bootstrapProxy.configure(
@@ -238,7 +249,7 @@ class SourceRoot : DokkaConfiguration.SourceRoot {
field = File(value).absolutePath
}
- override var defaultPlatforms: List<String> = arrayListOf()
+ override var platforms: List<String> = arrayListOf()
}
open class LinkMapping : Serializable, DokkaConfiguration.SourceLinkDefinition {
@@ -286,6 +297,12 @@ open class LinkMapping : Serializable, DokkaConfiguration.SourceLinkDefinition {
}
}
+class PackageOptions : DokkaConfiguration.PackageOptions {
+ override var prefix: String = ""
+ override var includeNonPublic: Boolean = false
+ override var reportUndocumented: Boolean = true
+ override var skipDeprecated: Boolean = false
+}
/**
* A provider for SDKs that can be used if a project uses classes that live outside the JDK or uses a
* different method to determine the source directories.