diff options
author | Dmitry Jemerov <intelliyole@gmail.com> | 2016-01-12 13:53:18 +0100 |
---|---|---|
committer | Dmitry Jemerov <intelliyole@gmail.com> | 2016-01-12 13:53:18 +0100 |
commit | ebdb4d43516a744bbc38f1dee2752e649c26f95d (patch) | |
tree | 5b285c29c476111cf0eb4baa82f00806ad37dfe6 /dokka-gradle-plugin/src/main/kotlin/main.kt | |
parent | 628356d63443b11ff2221707c54a397f548d38a4 (diff) | |
parent | fc0f3f7574198851be009dd62c720b8372344c95 (diff) | |
download | dokka-ebdb4d43516a744bbc38f1dee2752e649c26f95d.tar.gz dokka-ebdb4d43516a744bbc38f1dee2752e649c26f95d.tar.bz2 dokka-ebdb4d43516a744bbc38f1dee2752e649c26f95d.zip |
Merge pull request #48 from ingokegel/master
@Suppress("NOT_DOCUMENTED"), fix for linking to targets with underscores, gradle plugin improvements
Diffstat (limited to 'dokka-gradle-plugin/src/main/kotlin/main.kt')
-rw-r--r-- | dokka-gradle-plugin/src/main/kotlin/main.kt | 16 |
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 3eccafd5..53045326 100644 --- a/dokka-gradle-plugin/src/main/kotlin/main.kt +++ b/dokka-gradle-plugin/src/main/kotlin/main.kt @@ -34,13 +34,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() fun linkMapping(closure: Closure<Any?>) { val mapping = LinkMapping() @@ -65,7 +65,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()) { @@ -77,8 +77,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, outputDirectory, outputFormat, @@ -95,7 +95,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) |