From d8362187f13ff6b53ed6d6f17f836a4e3f70ae97 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 30 Jun 2016 20:13:17 +0200 Subject: fix Dokka up-to-date checks (KT-12323) --- dokka-gradle-plugin/src/main/kotlin/main.kt | 31 +++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) (limited to 'dokka-gradle-plugin/src') diff --git a/dokka-gradle-plugin/src/main/kotlin/main.kt b/dokka-gradle-plugin/src/main/kotlin/main.kt index 8fccf85e..49c3b8ba 100644 --- a/dokka-gradle-plugin/src/main/kotlin/main.kt +++ b/dokka-gradle-plugin/src/main/kotlin/main.kt @@ -114,22 +114,45 @@ open class DokkaTask : DefaultTask() { return sourceDirs?.filter { it.exists() } ?: emptyList() } - @Input @InputFiles @SkipWhenEmpty - fun getInputFiles(): FileCollection = project.files(getSourceDirectories().map { project.fileTree(it) }) + + fun getInputFiles(): FileCollection = + project.files(getSourceDirectories().map { project.fileTree(it) }) + project.files(includes) + - project.files(samples) + project.files(samples.map { project.fileTree(it) }) @OutputDirectory fun getOutputDirectoryAsFile(): File = project.file(outputDirectory) - } open class LinkMapping : Serializable { var dir: String = "" var url: String = "" var suffix: String? = null + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other?.javaClass != javaClass) return false + + other as LinkMapping + + if (dir != other.dir) return false + if (url != other.url) return false + if (suffix != other.suffix) return false + + return true + } + + override fun hashCode(): Int { + var result = dir.hashCode() + result = 31 * result + url.hashCode() + result = 31 * result + (suffix?.hashCode() ?: 0) + return result + } + + companion object { + const val serialVersionUID: Long = -8133501684312445981L + } } /** -- cgit