From ab3621abcc468cead0206d3c45f200f6c9ea10b9 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Fri, 18 May 2018 12:45:49 +0300 Subject: Enable suppression of generated files for Android plugin 3.2.0-alpha Fix #308 --- runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'runners/android-gradle-plugin/src') diff --git a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt index f2261120..bd2e88c2 100644 --- a/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt +++ b/runners/android-gradle-plugin/src/main/kotlin/mainAndroid.kt @@ -23,8 +23,12 @@ open class DokkaAndroidTask : DokkaTask() { @Input var noAndroidSdkLink: Boolean = false override fun collectSuppressedFiles(sourceRoots: List): List { - val generatedSubpath = "${project.buildDir}/generated/source".replace("/", File.separator) - return sourceRoots.filter { generatedSubpath in it.path }.flatMap { File(it.path).walk().toList() }.map { it.absolutePath } + val generatedRoot = project.buildDir.resolve("generated").absoluteFile + return sourceRoots + .map { File(it.path) } + .filter { it.startsWith(generatedRoot) } + .flatMap { it.walk().toList() } + .map { it.absolutePath } } init { -- cgit