diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-06-23 16:42:23 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-06-23 16:42:23 +0300 |
commit | 1121071276ca2ce0afeabf4d3e540d4d8103f311 (patch) | |
tree | 6499cd796a09ce2f097b522224cc3e0d1a4c6764 /runners/gradle-plugin/src/main/kotlin/main.kt | |
parent | cb6928f9b823c7fde746f17da4834431de452c83 (diff) | |
download | dokka-1121071276ca2ce0afeabf4d3e540d4d8103f311.tar.gz dokka-1121071276ca2ce0afeabf4d3e540d4d8103f311.tar.bz2 dokka-1121071276ca2ce0afeabf4d3e540d4d8103f311.zip |
Suppress output of android.R and other generated stuff in dokka-android
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin/main.kt')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/main.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/main.kt b/runners/gradle-plugin/src/main/kotlin/main.kt index fd4053ee..0417b02a 100644 --- a/runners/gradle-plugin/src/main/kotlin/main.kt +++ b/runners/gradle-plugin/src/main/kotlin/main.kt @@ -231,6 +231,8 @@ open class DokkaTask : DefaultTask() { private fun Iterable<File>.toSourceRoots(): List<SourceRoot> = this.filter { it.exists() }.map { SourceRoot().apply { path = it.path } } + protected open fun collectSuppressedFiles(sourceRoots: List<SourceRoot>): List<String> = emptyList() + @TaskAction fun generate() { val kotlinColorsEnabledBefore = System.getProperty(COLORS_ENABLED_PROPERTY) ?: "false" @@ -276,7 +278,8 @@ open class DokkaTask : DefaultTask() { perPackageOptions, externalDocumentationLinks, noStdlibLink, - cacheRoot) + cacheRoot, + collectSuppressedFiles(sourceRoots)) bootstrapProxy.configure( @@ -326,11 +329,9 @@ open class DokkaTask : DefaultTask() { } - @SkipWhenEmpty @InputFiles fun getInputFiles(): FileCollection = - project.files(kotlinCompileBasedClasspathAndSourceRoots.sourceRoots.map { project.fileTree(File(it.path)) }) + - project.files(collectSourceRoots().map { project.fileTree(File(it.path)) }) + + project.files(collectSourceRoots().map { project.fileTree(File(it.path)) }) + project.files(includes) + project.files(samples.map { project.fileTree(it) }) |