aboutsummaryrefslogtreecommitdiff
path: root/dokka-gradle-plugin/src/main/kotlin/main.kt
diff options
context:
space:
mode:
Diffstat (limited to 'dokka-gradle-plugin/src/main/kotlin/main.kt')
-rw-r--r--dokka-gradle-plugin/src/main/kotlin/main.kt16
1 files changed, 9 insertions, 7 deletions
diff --git a/dokka-gradle-plugin/src/main/kotlin/main.kt b/dokka-gradle-plugin/src/main/kotlin/main.kt
index 1fe0058f..476f7656 100644
--- a/dokka-gradle-plugin/src/main/kotlin/main.kt
+++ b/dokka-gradle-plugin/src/main/kotlin/main.kt
@@ -35,13 +35,13 @@ open class DokkaTask : DefaultTask() {
var outputFormat: String = "html"
var outputDirectory: String = ""
@Input
- var processConfigurations: ArrayList<String> = arrayListOf("compile")
+ var processConfigurations: List<Any?> = arrayListOf("compile")
@Input
- var includes: ArrayList<String> = arrayListOf()
+ var includes: List<Any?> = arrayListOf()
@Input
var linkMappings: ArrayList<LinkMapping> = arrayListOf()
@Input
- var samples: ArrayList<String> = arrayListOf()
+ var samples: List<Any?> = arrayListOf()
@Input
var jdkVersion: Int = 6
@@ -68,7 +68,7 @@ open class DokkaTask : DefaultTask() {
val classpath =
processConfigurations
- .map { allConfigurations?.getByName(it) ?: throw IllegalArgumentException("No configuration $it found") }
+ .map { allConfigurations?.getByName(it.toString()) ?: throw IllegalArgumentException("No configuration $it found") }
.flatMap { it }
if (sourceDirectories.isEmpty()) {
@@ -80,8 +80,8 @@ open class DokkaTask : DefaultTask() {
DokkaGradleLogger(logger),
classpath.map { it.absolutePath },
sourceDirectories.map { it.absolutePath },
- samples,
- includes,
+ samples.filterNotNull().map { project.file(it).absolutePath },
+ includes.filterNotNull().map { project.file(it).absolutePath },
moduleName,
DocumentationOptions(outputDirectory, outputFormat,
sourceLinks = linkMappings.map { SourceLinkDefinition(project.file(it.dir).absolutePath, it.url, it.suffix) },
@@ -97,7 +97,9 @@ open class DokkaTask : DefaultTask() {
@InputFiles
@SkipWhenEmpty
- fun getIncludedFiles() : FileCollection = project.files(getSourceDirectories().map { project.fileTree(it) })
+ fun getInputFiles() : FileCollection = project.files(getSourceDirectories().map { project.fileTree(it) }) +
+ project.files(includes) +
+ project.files(samples)
@OutputDirectory
fun getOutputDirectoryAsFile() : File = project.file(outputDirectory)