aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt21
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"