diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-04-14 13:20:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-14 13:20:02 +0200 |
commit | f27be3dfd3fa264f946161611638ad260a0ff392 (patch) | |
tree | 74301f87584b27e17af83118947a98397e9612fc /runners/gradle-plugin/src/main/kotlin | |
parent | 09d030e1da5ddf687e2ba6927973898e19c99390 (diff) | |
download | dokka-f27be3dfd3fa264f946161611638ad260a0ff392.tar.gz dokka-f27be3dfd3fa264f946161611638ad260a0ff392.tar.bz2 dokka-f27be3dfd3fa264f946161611638ad260a0ff392.zip |
Add ability to document generated files (#1832)
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
2 files changed, 6 insertions, 2 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt index 17e7dd1c..70d84dc4 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt @@ -69,6 +69,10 @@ open class GradleDokkaSourceSetBuilder( .safeConvention(DokkaDefaults.skipDeprecated) @Input + val suppressGeneratedFiles: Property<Boolean> = project.objects.safeProperty<Boolean>() + .safeConvention(true) + + @Input val jdkVersion: Property<Int> = project.objects.safeProperty<Int>() .safeConvention(DokkaDefaults.jdkVersion) diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt index 2813d04e..74e3d16d 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt @@ -57,7 +57,7 @@ private fun GradleDokkaSourceSetBuilder.externalDocumentationLinksWithDefaults() } private fun GradleDokkaSourceSetBuilder.suppressedFilesWithDefaults(): Set<File> { - val suppressedFilesForAndroid = if (project.isAndroidProject()) { + val suppressedGeneratedFiles = if (suppressGeneratedFiles.getSafe()) { val generatedRoot = project.buildDir.resolve("generated").absoluteFile sourceRoots .filter { it.startsWith(generatedRoot) } @@ -67,5 +67,5 @@ private fun GradleDokkaSourceSetBuilder.suppressedFilesWithDefaults(): Set<File> emptySet() } - return suppressedFiles.toSet() + suppressedFilesForAndroid + return suppressedFiles.toSet() + suppressedGeneratedFiles } |