diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-02 05:32:50 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-02 18:00:04 +0300 |
commit | 2290bcbd6efc8ac8d36b88d37b4281c1a90b106c (patch) | |
tree | 93a499093e1b56fd603f99b08f8e0271fe20c49c /runners/gradle-plugin/src/main | |
parent | a10c1f852813ea1c0e4f15b3c25a7a5388bbc996 (diff) | |
download | dokka-2290bcbd6efc8ac8d36b88d37b4281c1a90b106c.tar.gz dokka-2290bcbd6efc8ac8d36b88d37b4281c1a90b106c.tar.bz2 dokka-2290bcbd6efc8ac8d36b88d37b4281c1a90b106c.zip |
Fix not rebuilding on source change
Fixes #227
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/main.kt | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt index 02970ae0..1fbbb0e0 100644 --- a/runners/gradle-plugin/src/main/kotlin/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/main.kt @@ -95,7 +95,8 @@ open class DokkaTask : DefaultTask() { @Input var sourceDirs: Iterable<File> = emptyList() - @Input var sourceRoots: MutableList<SourceRoot> = arrayListOf() + @Input + var sourceRoots: MutableList<SourceRoot> = arrayListOf() @Input var dokkaFatJar: Any = "org.jetbrains.dokka:dokka-fatjar:$version" @@ -331,10 +332,17 @@ open class DokkaTask : DefaultTask() { @InputFiles - fun getInputFiles(): FileCollection = - project.files(collectSourceRoots().map { project.fileTree(File(it.path)) }) + - project.files(includes) + - project.files(samples.map { project.fileTree(it) }) + fun getInputFiles(): FileCollection { + val (tasksClasspath, tasksSourceRoots) = kotlinCompileBasedClasspathAndSourceRoots + + val fullClasspath = collectClasspathFromOldSources() + tasksClasspath + classpath + + return project.files(tasksSourceRoots.map { project.fileTree(it) }) + + project.files(collectSourceRoots().map { project.fileTree(File(it.path)) }) + + project.files(fullClasspath.map { project.fileTree(it) }) + + project.files(includes) + + project.files(samples.map { project.fileTree(it) }) + } @OutputDirectory fun getOutputDirectoryAsFile(): File = project.file(outputDirectory) |