diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-05-03 16:25:50 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-05-04 14:35:09 +0300 |
commit | 3b6e3a8bf69b7470cd7e9a867ff3b2e7e645fbd4 (patch) | |
tree | a2cf05b5734bdb6540466a0e56b4fc4e34d792a4 /runners/gradle-plugin/src/main/kotlin | |
parent | c2afb348bb0d3dd60d336aa312b5fcedfb31b966 (diff) | |
download | dokka-3b6e3a8bf69b7470cd7e9a867ff3b2e7e645fbd4.tar.gz dokka-3b6e3a8bf69b7470cd7e9a867ff3b2e7e645fbd4.tar.bz2 dokka-3b6e3a8bf69b7470cd7e9a867ff3b2e7e645fbd4.zip |
Add bunch of new parameters to runners
Such as packageOptions, impliedPlatforms and so on
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/main.kt | 23 |
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. |