diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2016-06-30 20:13:17 +0200 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2016-06-30 20:13:17 +0200 |
commit | d8362187f13ff6b53ed6d6f17f836a4e3f70ae97 (patch) | |
tree | c1c01e522f7c43f2a587d7c81d9a847dd678df5d /dokka-gradle-plugin/src/main | |
parent | f03e31ece73774e2ab1df9c55bcb0b65e68f0ddb (diff) | |
download | dokka-d8362187f13ff6b53ed6d6f17f836a4e3f70ae97.tar.gz dokka-d8362187f13ff6b53ed6d6f17f836a4e3f70ae97.tar.bz2 dokka-d8362187f13ff6b53ed6d6f17f836a4e3f70ae97.zip |
fix Dokka up-to-date checks (KT-12323)
Diffstat (limited to 'dokka-gradle-plugin/src/main')
-rw-r--r-- | dokka-gradle-plugin/src/main/kotlin/main.kt | 31 |
1 files changed, 27 insertions, 4 deletions
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 + } } /** |