aboutsummaryrefslogtreecommitdiff
path: root/dokka-gradle-plugin/src/main/kotlin
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-01-12 13:53:52 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-01-12 13:53:52 +0100
commit164575ebcdc5fda56117cdc9d5c39be3f137c88b (patch)
tree113bbf7b0f5d83d35e0f715d20e0831ae3a36637 /dokka-gradle-plugin/src/main/kotlin
parentda2cf094df5e8bc0470823e7154be84dcd578cd2 (diff)
parentebdb4d43516a744bbc38f1dee2752e649c26f95d (diff)
downloaddokka-164575ebcdc5fda56117cdc9d5c39be3f137c88b.tar.gz
dokka-164575ebcdc5fda56117cdc9d5c39be3f137c88b.tar.bz2
dokka-164575ebcdc5fda56117cdc9d5c39be3f137c88b.zip
Merge remote-tracking branch 'origin/master'
# Conflicts: # dokka-gradle-plugin/src/main/kotlin/main.kt
Diffstat (limited to 'dokka-gradle-plugin/src/main/kotlin')
-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)