diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-07-01 19:27:38 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-07 10:07:21 +0200 |
commit | 1f73de1df8cce09ac4e760db34759ca70ee12b6d (patch) | |
tree | 1c1130f89e4c2a433c692e6087395d7e1da1aa6b /core/src/main | |
parent | 145a63c9d39c1c59c4a5d6c81dabd078d64edd4b (diff) | |
download | dokka-1f73de1df8cce09ac4e760db34759ca70ee12b6d.tar.gz dokka-1f73de1df8cce09ac4e760db34759ca70ee12b6d.tar.bz2 dokka-1f73de1df8cce09ac4e760db34759ca70ee12b6d.zip |
Add suppression capabilities for plugins
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/kotlin/plugability/DokkaContext.kt | 6 | ||||
-rw-r--r-- | core/src/main/kotlin/plugability/DokkaPlugin.kt | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt index 5c595c75..e7028ccf 100644 --- a/core/src/main/kotlin/plugability/DokkaContext.kt +++ b/core/src/main/kotlin/plugability/DokkaContext.kt @@ -167,6 +167,12 @@ private class DokkaContextConfigurationImpl( plugins[plugin::class] = plugin plugin.context = this plugin.internalInstall(this, this.configuration) + + if (plugin is WithUnsafeExtensionSuppression) { + plugin.extensionsSuppressed.forEach { + suppressedExtensions.listFor(it) += Suppression.ByPlugin(plugin) + } + } } override fun installExtension(extension: Extension<*, *, *>) { diff --git a/core/src/main/kotlin/plugability/DokkaPlugin.kt b/core/src/main/kotlin/plugability/DokkaPlugin.kt index 671cefad..2c755a49 100644 --- a/core/src/main/kotlin/plugability/DokkaPlugin.kt +++ b/core/src/main/kotlin/plugability/DokkaPlugin.kt @@ -44,6 +44,10 @@ abstract class DokkaPlugin { } } +interface WithUnsafeExtensionSuppression { + val extensionsSuppressed: List<Extension<*, *, *>> +} + interface Configurable { val pluginsConfiguration: Map<String, String> } |