diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-03-16 17:19:30 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-03-20 18:20:19 +0300 |
commit | 51377df14fcbc326a79fcee0975d29b5ca014a85 (patch) | |
tree | b0d76c728d43c2f5a9b93f01359f55689441037e | |
parent | 2eb805e47505388c0e47102e9257f6f79681e699 (diff) | |
download | dokka-51377df14fcbc326a79fcee0975d29b5ca014a85.tar.gz dokka-51377df14fcbc326a79fcee0975d29b5ca014a85.tar.bz2 dokka-51377df14fcbc326a79fcee0975d29b5ca014a85.zip |
Deprecate old kotlin-website formats
4 files changed, 18 insertions, 5 deletions
diff --git a/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt b/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt index eac053aa..08349980 100644 --- a/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt +++ b/core/src/main/kotlin/Formats/KotlinWebsiteFormatService.kt @@ -174,9 +174,14 @@ open class KotlinWebsiteOutputBuilder(to: StringBuilder, class KotlinWebsiteFormatService @Inject constructor(locationService: LocationService, signatureGenerator: LanguageService, - @Named(impliedPlatformsName) impliedPlatforms: List<String>) + @Named(impliedPlatformsName) impliedPlatforms: List<String>, + logger: DokkaLogger) : JekyllFormatService(locationService, signatureGenerator, "html", impliedPlatforms) { + init { + logger.warn("Format kotlin-website deprecated and will be removed in next release") + } + override fun createOutputBuilder(to: StringBuilder, location: Location) = KotlinWebsiteOutputBuilder(to, location, locationService, languageService, extension, impliedPlatforms) } @@ -204,8 +209,14 @@ class KotlinWebsiteRunnableSamplesOutputBuilder(to: StringBuilder, class KotlinWebsiteRunnableSamplesFormatService @Inject constructor(locationService: LocationService, signatureGenerator: LanguageService, - @Named(impliedPlatformsName) impliedPlatforms: List<String>) + @Named(impliedPlatformsName) impliedPlatforms: List<String>, + logger: DokkaLogger) : JekyllFormatService(locationService, signatureGenerator, "html", impliedPlatforms) { + + init { + logger.warn("Format kotlin-website-samples deprecated and will be removed in next release") + } + override fun createOutputBuilder(to: StringBuilder, location: Location) = KotlinWebsiteRunnableSamplesOutputBuilder(to, location, locationService, languageService, extension, impliedPlatforms) } diff --git a/core/src/main/kotlin/Utilities/DokkaModules.kt b/core/src/main/kotlin/Utilities/DokkaModules.kt index 5982d7dd..e213c0fc 100644 --- a/core/src/main/kotlin/Utilities/DokkaModules.kt +++ b/core/src/main/kotlin/Utilities/DokkaModules.kt @@ -19,6 +19,8 @@ class DokkaAnalysisModule(val environment: AnalysisEnvironment, val nodeReferenceGraph: NodeReferenceGraph, val logger: DokkaLogger) : Module { override fun configure(binder: Binder) { + binder.bind<DokkaLogger>().toInstance(logger) + val descriptor = ServiceLocator.lookup<FormatDescriptor>("format", options.outputFormat) binder.registerCategory<LanguageService>("language") @@ -33,7 +35,6 @@ class DokkaAnalysisModule(val environment: AnalysisEnvironment, binder.bind<DokkaResolutionFacade>().toInstance(dokkaResolutionFacade) binder.bind<DocumentationOptions>().toInstance(options) - binder.bind<DokkaLogger>().toInstance(logger) binder.bind<DefaultPlatformsProvider>().toInstance(defaultPlatformsProvider) diff --git a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt index 9565263f..83f80031 100644 --- a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt +++ b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt @@ -5,7 +5,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList import org.junit.Test class KotlinWebSiteFormatTest { - private val kwsService = KotlinWebsiteFormatService(InMemoryLocationService, KotlinLanguageService(), listOf()) + private val kwsService = KotlinWebsiteFormatService(InMemoryLocationService, KotlinLanguageService(), listOf(), DokkaConsoleLogger) @Test fun sample() { verifyKWSNodeByName("sample", "foo") diff --git a/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt index 0d586814..4662f059 100644 --- a/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt +++ b/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt @@ -1,11 +1,12 @@ package org.jetbrains.dokka.tests +import org.jetbrains.dokka.DokkaConsoleLogger import org.jetbrains.dokka.KotlinLanguageService import org.jetbrains.dokka.KotlinWebsiteRunnableSamplesFormatService import org.junit.Test class KotlinWebSiteRunnableSamplesFormatTest { - private val kwsService = KotlinWebsiteRunnableSamplesFormatService(InMemoryLocationService, KotlinLanguageService(), listOf()) + private val kwsService = KotlinWebsiteRunnableSamplesFormatService(InMemoryLocationService, KotlinLanguageService(), listOf(), DokkaConsoleLogger) @Test fun dropImport() { |