diff options
Diffstat (limited to 'src/Utilities/GuiceModule.kt')
-rw-r--r-- | src/Utilities/GuiceModule.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Utilities/GuiceModule.kt b/src/Utilities/GuiceModule.kt index 855d70b6..e852ae19 100644 --- a/src/Utilities/GuiceModule.kt +++ b/src/Utilities/GuiceModule.kt @@ -4,6 +4,7 @@ import com.google.inject.Binder import com.google.inject.Module import com.google.inject.Provider import com.google.inject.name.Names +import com.google.inject.util.Providers import org.jetbrains.dokka.* import org.jetbrains.dokka.Formats.FormatDescriptor import java.io.File @@ -40,6 +41,12 @@ class GuiceModule(val config: DokkaGenerator) : Module { descriptor.formatServiceClass?.let { clazz -> binder.bind(FormatService::class.java).to(clazz) } + if (descriptor.packageDocumentationBuilderServiceClass != null) { + binder.bind(PackageDocumentationBuilder::class.java).to(descriptor.packageDocumentationBuilderServiceClass) + } else { + binder.bind(PackageDocumentationBuilder::class.java).toProvider(Providers.of(null)) + } + binder.bind(Generator::class.java).to(descriptor.generatorServiceClass) } |