diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-06-06 14:50:13 +0200 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-06-06 14:50:13 +0200 |
commit | 993b8fe11d9ca566fdfab997489fcc948182aae5 (patch) | |
tree | 12bc586b12f00a695993e3eab523ee4d17abaa3a /runners/gradle-plugin/src/main/kotlin | |
parent | 5aace9a4633f95a45f9ffd7f1cf8e833e573e489 (diff) | |
download | dokka-993b8fe11d9ca566fdfab997489fcc948182aae5.tar.gz dokka-993b8fe11d9ca566fdfab997489fcc948182aae5.tar.bz2 dokka-993b8fe11d9ca566fdfab997489fcc948182aae5.zip |
Fix some bugs
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt index 62a37249..fa2e690e 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt @@ -253,6 +253,7 @@ open class DokkaTask : DefaultTask() { if (config.moduleName == "") { config.moduleName = moduleName } + config.classpath = (config.classpath as List<Any>).map { it.toString() } // Workaround for Groovy's GStringImpl config.samples = config.samples.map { project.file(it).absolutePath } config.includes = config.includes.map { project.file(it).absolutePath } config.suppressedFiles += collectSuppressedFiles(config.sourceRoots) @@ -263,18 +264,22 @@ open class DokkaTask : DefaultTask() { return config } - /** - * Needed for Gradle incremental build - */ + // Needed for Gradle incremental build @OutputDirectory fun getOutputDirectoryAsFile(): File = project.file(outputDirectory) - /** - * Needed for Gradle incremental build - */ + // Needed for Gradle incremental build @InputFiles - fun getInputFiles(): FileCollection = - project.files(collectConfigurations().flatMap { it.sourceRoots }.map { project.fileTree(File(it.path)) }) + fun getInputFiles(): FileCollection { + val config = collectConfigurations() + return project.files(config.flatMap { it.sourceRoots }.map { project.fileTree(File(it.path)) }) + + project.files(config.flatMap { it.includes }) + + project.files(config.flatMap { it.samples }.map { project.fileTree(File(it)) }) + } + + @Classpath + fun getInputClasspath(): FileCollection = + project.files((collectConfigurations().flatMap { it.classpath } as List<Any>).map { project.fileTree(File(it.toString())) }) companion object { const val COLORS_ENABLED_PROPERTY = "kotlin.colors.enabled" |