From f3baf10b4c882230d382bfcdd94163d070bd0e25 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Wed, 20 May 2020 12:05:26 +0200 Subject: Rework dokka configuration and Gradle plugin --- .idea/compiler.xml | 148 +----------------- build.gradle.kts | 7 + core/src/main/kotlin/DokkaGenerator.kt | 14 +- core/src/main/kotlin/configuration.kt | 10 +- core/src/main/kotlin/defaultConfiguration.kt | 14 +- core/src/main/kotlin/model/SourceSetData.kt | 23 ++- .../src/main/kotlin/renderers/html/HtmlRenderer.kt | 29 ++-- .../kotlin/renderers/html/htmlPreprocessors.kt | 2 +- .../resolvers/local/DefaultLocationProvider.kt | 17 +-- .../ModuleAndPackageDocumentationTransformer.kt | 4 +- .../DefaultDescriptorToDocumentableTranslator.kt | 2 +- .../annotations/ContentForAnnotationsTest.kt | 1 - .../kotlin/content/params/ContentForParamsTest.kt | 1 - .../content/seealso/ContentForSeeAlsoTest.kt | 3 +- .../content/signatures/ContentForSignaturesTest.kt | 1 - .../kotlin/linkableContent/LinkableContentTest.kt | 8 +- plugins/base/src/test/kotlin/markdown/LinkTest.kt | 2 +- .../base/src/test/kotlin/model/InheritorsTest.kt | 2 - plugins/base/src/test/kotlin/model/PackagesTest.kt | 4 +- .../test/kotlin/renderers/RenderingOnlyTestBase.kt | 6 +- .../test/kotlin/renderers/html/DivergentTest.kt | 6 +- .../renderers/html/SourceSetDependentHintTest.kt | 6 +- plugins/base/src/test/kotlin/utils/ModelUtils.kt | 2 - plugins/gfm/src/main/kotlin/GfmPlugin.kt | 2 +- runners/cli/src/main/kotlin/cli/main.kt | 64 +++----- .../dokka/gradle/ConfigurationExtractor.kt | 152 ++++++------------ .../jetbrains/dokka/gradle/DokkaCollectorTask.kt | 7 +- .../jetbrains/dokka/gradle/DokkaMultimoduleTask.kt | 10 +- .../kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 169 +++++++++++---------- .../dokka/gradle/configurationImplementations.kt | 11 +- .../main/kotlin/org/jetbrains/dokka/gradle/main.kt | 24 ++- .../kotlin/org/jetbrains/dokka/gradle/utils.kt | 17 ++- runners/maven-plugin/src/main/kotlin/DokkaMojo.kt | 55 +++---- settings.gradle.kts | 5 +- .../main/kotlin/testApi/testRunner/TestRunner.kt | 25 ++- 35 files changed, 319 insertions(+), 534 deletions(-) diff --git a/.idea/compiler.xml b/.idea/compiler.xml index dd174dd7..a6b0adf4 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -12,148 +12,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 0b3c0da8..c94faa77 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,6 +5,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { kotlin("jvm") apply false id("com.jfrog.bintray") apply false + id("java") } val dokka_version: String by project @@ -39,6 +40,12 @@ allprojects { subprojects { apply { plugin("org.jetbrains.kotlin.jvm") + plugin("java") + } + + // Gradle metadata + java { + targetCompatibility = JavaVersion.VERSION_1_8 } } diff --git a/core/src/main/kotlin/DokkaGenerator.kt b/core/src/main/kotlin/DokkaGenerator.kt index 61fb7324..c8a892d7 100644 --- a/core/src/main/kotlin/DokkaGenerator.kt +++ b/core/src/main/kotlin/DokkaGenerator.kt @@ -5,7 +5,6 @@ import org.jetbrains.dokka.analysis.DokkaResolutionFacade import org.jetbrains.dokka.model.DModule import org.jetbrains.dokka.model.SourceSetCache import org.jetbrains.dokka.model.SourceSetData -import org.jetbrains.dokka.model.sourceSet import org.jetbrains.dokka.pages.RootPageNode import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.plugability.DokkaPlugin @@ -81,7 +80,7 @@ class DokkaGenerator( sourceSetsCache: SourceSetCache ): Map = configuration.passesConfigurations.map { - sourceSetsCache.getSourceSet(it) to createEnvironmentAndFacade(it) + sourceSetsCache.getSourceSet(it) to createEnvironmentAndFacade(configuration, it) }.toMap() fun initializePlugins( @@ -139,14 +138,21 @@ class DokkaGenerator( renderer.render(transformedPages) } - private fun createEnvironmentAndFacade(pass: DokkaConfiguration.PassConfiguration): EnvironmentAndFacade = + private fun createEnvironmentAndFacade( + configuration: DokkaConfiguration, + pass: DokkaConfiguration.PassConfiguration + ): EnvironmentAndFacade = AnalysisEnvironment(DokkaMessageCollector(logger), pass.analysisPlatform).run { if (analysisPlatform == Platform.jvm) { addClasspath(PathUtil.getJdkClassesRootsFromCurrentJre()) } pass.classpath.forEach { addClasspath(File(it)) } - addSources((pass.sourceRoots + pass.dependentSourceRoots).map { it.path }) + addSources( + (pass.sourceRoots + configuration.passesConfigurations.filter { it.sourceSetID in pass.dependentSourceSets } + .flatMap { it.sourceRoots }) + .map { it.path } + ) loadLanguageVersionSettings(pass.languageVersion, pass.apiVersion) diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt index 0b59f301..fab7af37 100644 --- a/core/src/main/kotlin/configuration.kt +++ b/core/src/main/kotlin/configuration.kt @@ -27,20 +27,19 @@ enum class Platform(val key: String) { interface DokkaConfiguration { val outputDir: String val format: String - val generateIndexPages: Boolean val cacheRoot: String? + val offlineMode: Boolean val passesConfigurations: List val modules: List - val impliedPlatforms: List val pluginsClasspath: List val pluginsConfiguration: Map interface PassConfiguration { val moduleName: String - val sourceSetName: String + val displayName: String + val sourceSetID: String val classpath: List val sourceRoots: List - val dependentSourceRoots: List val dependentSourceSets: List val samples: List val includes: List @@ -58,10 +57,7 @@ interface DokkaConfiguration { val noStdlibLink: Boolean val noJdkLink: Boolean val suppressedFiles: List - val collectInheritedExtensionsFromLibraries: Boolean val analysisPlatform: Platform - val targets: List - val sinceKotlin: String? } interface SourceRoot { diff --git a/core/src/main/kotlin/defaultConfiguration.kt b/core/src/main/kotlin/defaultConfiguration.kt index 7aaa1c89..23cf7e2d 100644 --- a/core/src/main/kotlin/defaultConfiguration.kt +++ b/core/src/main/kotlin/defaultConfiguration.kt @@ -6,21 +6,20 @@ import java.net.URL data class DokkaConfigurationImpl( override val outputDir: String, override val format: String, - override val generateIndexPages: Boolean, override val cacheRoot: String?, - override val impliedPlatforms: List, + override val offlineMode: Boolean, override val passesConfigurations: List, override val pluginsClasspath: List, override val pluginsConfiguration: Map, override val modules: List ) : DokkaConfiguration -data class PassConfigurationImpl ( +data class PassConfigurationImpl( override val moduleName: String, - override val sourceSetName: String, + override val displayName: String, + override val sourceSetID: String, override val classpath: List, override val sourceRoots: List, - override val dependentSourceRoots: List, override val dependentSourceSets: List, override val samples: List, override val includes: List, @@ -38,10 +37,7 @@ data class PassConfigurationImpl ( override val noStdlibLink: Boolean, override val noJdkLink: Boolean, override val suppressedFiles: List, - override val collectInheritedExtensionsFromLibraries: Boolean, - override val analysisPlatform: Platform, - override val targets: List, - override val sinceKotlin: String? + override val analysisPlatform: Platform ) : DokkaConfiguration.PassConfiguration data class DokkaModuleDescriptionImpl( diff --git a/core/src/main/kotlin/model/SourceSetData.kt b/core/src/main/kotlin/model/SourceSetData.kt index 964d5ca9..7d118470 100644 --- a/core/src/main/kotlin/model/SourceSetData.kt +++ b/core/src/main/kotlin/model/SourceSetData.kt @@ -6,22 +6,33 @@ import org.jetbrains.dokka.plugability.DokkaContext data class SourceSetData( val moduleName: String, - val sourceSetName: String, + val sourceSetID: String, + val displayName: String, val platform: Platform, val sourceRoots: List = emptyList(), - val dependentSourceSets: List = emptyList() + val dependentSourceSets: List = emptyList() ) class SourceSetCache { private val sourceSets = HashMap() val allSourceSets: List - get() = sourceSets.values.toList() + get() = sourceSets.values.toList() fun getSourceSet(pass: DokkaConfiguration.PassConfiguration) = - sourceSets.getOrPut("${pass.moduleName}/${pass.sourceSetName}", - { SourceSetData(pass.moduleName, pass.sourceSetName, pass.analysisPlatform, pass.sourceRoots, pass.dependentSourceSets) } + sourceSets.getOrPut("${pass.moduleName}/${pass.sourceSetID}", + { + SourceSetData( + pass.moduleName, + pass.sourceSetID, + pass.displayName, + pass.analysisPlatform, + pass.sourceRoots, + pass.dependentSourceSets + ) + } ) } -fun DokkaContext.sourceSet(pass: DokkaConfiguration.PassConfiguration) : SourceSetData = sourceSetCache.getSourceSet(pass) \ No newline at end of file +fun DokkaContext.sourceSet(pass: DokkaConfiguration.PassConfiguration): SourceSetData = + sourceSetCache.getSourceSet(pass) \ No newline at end of file diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt index 42273d20..528b7d16 100644 --- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt +++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt @@ -22,7 +22,7 @@ open class HtmlRenderer( private val sourceSetDependencyMap = with(context.sourceSetCache) { allSourceSets.map { sourceSet -> - sourceSet to allSourceSets.filter { sourceSet.dependentSourceSets.contains(it.sourceSetName) } + sourceSet to allSourceSets.filter { sourceSet.dependentSourceSets.contains(it.sourceSetID ) } }.toMap() } @@ -93,14 +93,14 @@ open class HtmlRenderer( group.sourceSets.forEach { button(classes = "platform-tag platform-selector") { attributes["data-active"] = "" - attributes["data-filter"] = it.sourceSetName - when (it.platform.key) { + attributes["data-filter"] = it.sourceSetID + when(it.platform.key) { "common" -> classes = classes + "common-like" "native" -> classes = classes + "native-like" "jvm" -> classes = classes + "jvm-like" "js" -> classes = classes + "js-like" } - text(it.sourceSetName) + text(it.displayName) } } } @@ -161,10 +161,10 @@ open class HtmlRenderer( attributes["data-toggle-list"] = "data-toggle-list" contents.forEachIndexed { index, pair -> button(classes = "platform-bookmark") { - attributes["data-filterable-current"] = pair.first.sourceSetName - attributes["data-filterable-set"] = pair.first.sourceSetName + attributes["data-filterable-current"] = pair.first.sourceSetID + attributes["data-filterable-set"] = pair.first.sourceSetID if (index == 0) attributes["data-active"] = "" - attributes["data-toggle"] = pair.first.sourceSetName + attributes["data-toggle"] = pair.first.sourceSetID when ( pair.first.platform.key ) { @@ -173,8 +173,8 @@ open class HtmlRenderer( "jvm" -> classes = classes + "jvm-like" "js" -> classes = classes + "js-like" } - attributes["data-toggle"] = pair.first.sourceSetName - text(pair.first.sourceSetName) + attributes["data-toggle"] = pair.first.sourceSetID + text(pair.first.displayName) } } } @@ -242,10 +242,10 @@ open class HtmlRenderer( consumer.onTagContentUnsafe { +createHTML().div("divergent-group") { attributes["data-filterable-current"] = groupedDivergent.keys.joinToString(" ") { - it.sourceSetName + it.sourceSetID } attributes["data-filterable-set"] = groupedDivergent.keys.joinToString(" ") { - it.sourceSetName + it.sourceSetID } val divergentForPlatformDependent = groupedDivergent.map { (sourceSet, elements) -> @@ -346,12 +346,13 @@ open class HtmlRenderer( div(classes = "table-row") { if (!style.contains(MultimoduleTable)) { attributes["data-filterable-current"] = node.sourceSets.joinToString(" ") { - it.sourceSetName + it.sourceSetID } attributes["data-filterable-set"] = node.sourceSets.joinToString(" ") { - it.sourceSetName + it.sourceSetID } } + it.filterIsInstance().takeIf { it.isNotEmpty() }?.let { div("main-subrow " + node.style.joinToString(" ")) { it.filter { sourceSetRestriction == null || it.sourceSets.any { s -> s in sourceSetRestriction } } @@ -396,7 +397,7 @@ open class HtmlRenderer( "jvm" -> classes = classes + "jvm-like" "js" -> classes = classes + "js-like" } - text(it.sourceSetName) + text(it.displayName) } } } diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt index f10c85d5..cdb30555 100644 --- a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt +++ b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt @@ -87,7 +87,7 @@ object StyleAndScriptsAppender : PageTransformer { class SourcesetDependencyAppender(val context: DokkaContext) : PageTransformer{ override fun invoke(input: RootPageNode): RootPageNode { val dependenciesMap = context.configuration.passesConfigurations.map { - it.sourceSetName to it.dependentSourceSets + it.sourceSetID to it.dependentSourceSets }.toMap() fun createDependenciesJson() : String = "sourceset_dependencies = '{${ dependenciesMap.entries.joinToString(", ") { diff --git a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt index 322f4927..a9e58f17 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt @@ -98,26 +98,19 @@ open class DefaultLocationProvider( if (info == null) { toResolve.getOrPut(jdk) { mutableListOf() }.add(link) } else if (info.packages.contains(dri.packageName)) { - return link.url.toExternalForm() + getLink( - dri, - info - ) + return link.url.toExternalForm() + getLink(dri, info) } } } // Not in cache, resolve packageLists for ((jdk, links) in toResolve) { for (link in links) { + if(dokkaContext.configuration.offlineMode && link.packageListUrl.protocol.toLowerCase() != "file") + continue val locationInfo = - loadPackageList( - jdk, - link.packageListUrl - ) + loadPackageList(jdk, link.packageListUrl) if (locationInfo.packages.contains(dri.packageName)) { - return link.url.toExternalForm() + getLink( - dri, - locationInfo - ) + return link.url.toExternalForm() + getLink(dri, locationInfo) } } toResolve.remove(jdk) diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt index 04b2636c..2aab6018 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/ModuleAndPackageDocumentationTransformer.kt @@ -53,7 +53,7 @@ internal class ModuleAndPackageDocumentationTransformer(val context: DokkaContex module.sourceSets.mapNotNull { pd -> val doc = modulesAndPackagesDocumentation[Pair(module.name, pd)] val facade = context.platforms[pd]?.facade - ?: return@mapNotNull null.also { context.logger.warn("Could not find platform data for ${pd.moduleName}/${pd.sourceSetName}") } + ?: return@mapNotNull null.also { context.logger.warn("Could not find platform data for ${pd.moduleName}/${pd.sourceSetID}") } try { doc?.get("Module")?.get(module.name)?.run { pd to MarkdownParser( @@ -72,7 +72,7 @@ internal class ModuleAndPackageDocumentationTransformer(val context: DokkaContex it.name to it.sourceSets.mapNotNull { pd -> val doc = modulesAndPackagesDocumentation[Pair(module.name, pd)] val facade = context.platforms[pd]?.facade - ?: return@mapNotNull null.also { context.logger.warn("Could not find platform data for ${pd.moduleName}/${pd.sourceSetName}") } + ?: return@mapNotNull null.also { context.logger.warn("Could not find platform data for ${pd.moduleName}/${pd.sourceSetID}") } val descriptor = facade.moduleDescriptor.getPackage(FqName(it.name.let { if(it == "[JS root]") "" else it })) doc?.get("Package")?.get(it.name)?.run { pd to MarkdownParser( diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index bf92c849..33cad4f5 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -739,7 +739,7 @@ private class DokkaDescriptorVisitor( private fun ConstantsEnumValue.fullEnumEntryName() = "${this.enumClassId.relativeClassName.asString()}.${this.enumEntryName.identifier}" - private fun fallbackPackageName(): String = "[${sourceSet.sourceSetName} root]"// TODO: error-prone, find a better way to do it + private fun fallbackPackageName(): String = "[${sourceSet.displayName} root]"// TODO: error-prone, find a better way to do it } private fun DRI.withPackageFallbackTo(fallbackPackage: String): DRI { diff --git a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt index d10bd151..f91b82d5 100644 --- a/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt +++ b/plugins/base/src/test/kotlin/content/annotations/ContentForAnnotationsTest.kt @@ -19,7 +19,6 @@ class ContentForAnnotationsTest : AbstractCoreTest() { pass { sourceRoots = listOf("src/") analysisPlatform = "jvm" - targets = listOf("jvm") } } } diff --git a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt index e25567e0..335d834e 100644 --- a/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt +++ b/plugins/base/src/test/kotlin/content/params/ContentForParamsTest.kt @@ -12,7 +12,6 @@ class ContentForParamsTest : AbstractCoreTest() { pass { sourceRoots = listOf("src/") analysisPlatform = "jvm" - targets = listOf("jvm") } } } diff --git a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt index c9adc0bf..696c3032 100644 --- a/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt +++ b/plugins/base/src/test/kotlin/content/seealso/ContentForSeeAlsoTest.kt @@ -4,9 +4,9 @@ import matchers.content.* import org.jetbrains.dokka.pages.ContentPage import org.jetbrains.dokka.testApi.testRunner.AbstractCoreTest import org.junit.jupiter.api.Test +import utils.ParamAttributes import utils.bareSignature import utils.pWrapped -import utils.ParamAttributes import utils.unnamedTag class ContentForSeeAlsoTest : AbstractCoreTest() { @@ -15,7 +15,6 @@ class ContentForSeeAlsoTest : AbstractCoreTest() { pass { sourceRoots = listOf("src/") analysisPlatform = "jvm" - targets = listOf("jvm") } } } diff --git a/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt b/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt index bdefe45a..dc0488c8 100644 --- a/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt +++ b/plugins/base/src/test/kotlin/content/signatures/ContentForSignaturesTest.kt @@ -16,7 +16,6 @@ class ContentForSignaturesTest : AbstractCoreTest() { pass { sourceRoots = listOf("src/") analysisPlatform = "jvm" - targets = listOf("jvm") } } } diff --git a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt index 7cdb0de3..d49ec8a5 100644 --- a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt +++ b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt @@ -27,7 +27,6 @@ class LinkableContentTest : AbstractCoreTest() { pass { moduleName = "example" analysisPlatform = "js" - targets = listOf("js") sourceRoots = listOf("jsMain", "commonMain", "jvmAndJsSecondCommonMain").map { Paths.get("$testDataDir/$it/kotlin").toString() } @@ -37,7 +36,6 @@ class LinkableContentTest : AbstractCoreTest() { pass { moduleName = "example" analysisPlatform = "jvm" - targets = listOf("jvm") sourceRoots = listOf("jvmMain", "commonMain", "jvmAndJsSecondCommonMain").map { Paths.get("$testDataDir/$it/kotlin").toString() } @@ -68,7 +66,6 @@ class LinkableContentTest : AbstractCoreTest() { pass { moduleName = "example" analysisPlatform = "js" - targets = listOf("js") sourceRoots = listOf("$testDataDir/jsMain/kotlin") sourceLinks = listOf( SourceLinkDefinitionImpl( @@ -82,7 +79,6 @@ class LinkableContentTest : AbstractCoreTest() { pass { moduleName = "example" analysisPlatform = "jvm" - targets = listOf("jvm") sourceRoots = listOf("$testDataDir/jvmMain/kotlin") sourceLinks = listOf( SourceLinkDefinitionImpl( @@ -133,7 +129,6 @@ class LinkableContentTest : AbstractCoreTest() { pass { moduleName = "example" analysisPlatform = "js" - targets = listOf("js") sourceRoots = listOf("$testDataDir/jsMain/kotlin") sourceSetName = "js" samples = listOf("$testDataDir/jsMain/resources/Samples.kt") @@ -141,7 +136,6 @@ class LinkableContentTest : AbstractCoreTest() { pass { moduleName = "example" analysisPlatform = "jvm" - targets = listOf("jvm") sourceRoots = listOf("$testDataDir/jvmMain/kotlin") sourceSetName = "jvm" samples = listOf("$testDataDir/jvmMain/resources/Samples.kt") @@ -199,7 +193,7 @@ class LinkableContentTest : AbstractCoreTest() { pass { sourceRoots = listOf("src/") analysisPlatform = "jvm" - targets = listOf("jvm") + sourceSetName = "js" } } } diff --git a/plugins/base/src/test/kotlin/markdown/LinkTest.kt b/plugins/base/src/test/kotlin/markdown/LinkTest.kt index 20bd24ee..ddcef5db 100644 --- a/plugins/base/src/test/kotlin/markdown/LinkTest.kt +++ b/plugins/base/src/test/kotlin/markdown/LinkTest.kt @@ -70,7 +70,7 @@ class LinkTest : AbstractCoreTest() { val innerClass = root.children.first { it is ClasslikePageNode } val foo = innerClass.children.first { it.name == "foo" } as MemberPageNode - assertEquals(root.dri.first().toString(), "[main root]/Outer///PointingToDeclaration/") + assertEquals(root.dri.first().toString(), "[JVM root]/Outer///PointingToDeclaration/") assertNotNull(foo.content.dfs { it is ContentDRILink && it.address.toString() == root.dri.first().toString() } ) } } diff --git a/plugins/base/src/test/kotlin/model/InheritorsTest.kt b/plugins/base/src/test/kotlin/model/InheritorsTest.kt index ce8a87ca..5daebb73 100644 --- a/plugins/base/src/test/kotlin/model/InheritorsTest.kt +++ b/plugins/base/src/test/kotlin/model/InheritorsTest.kt @@ -48,12 +48,10 @@ class InheritorsTest : AbstractModelTest("/src/main/kotlin/inheritors/Test.kt", pass { sourceRoots = listOf("common/src/", "jvm/src/") analysisPlatform = "jvm" - targets = listOf("jvm") } pass { sourceRoots = listOf("common/src/", "js/src/") analysisPlatform = "js" - targets = listOf("js") } } } diff --git a/plugins/base/src/test/kotlin/model/PackagesTest.kt b/plugins/base/src/test/kotlin/model/PackagesTest.kt index 676f034a..c777ad05 100644 --- a/plugins/base/src/test/kotlin/model/PackagesTest.kt +++ b/plugins/base/src/test/kotlin/model/PackagesTest.kt @@ -14,8 +14,8 @@ class PackagesTest : AbstractModelTest("/src/main/kotlin/packages/Test.kt", "pac """.trimIndent(), prependPackage = false ) { - with((this / "[main root]").cast()) { - name equals "[main root]" + with((this / "[JVM root]").cast()) { + name equals "[JVM root]" children counts 0 } } diff --git a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt index a3bf9188..a4d7bd04 100644 --- a/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt +++ b/plugins/base/src/test/kotlin/renderers/RenderingOnlyTestBase.kt @@ -33,10 +33,10 @@ abstract class RenderingOnlyTestBase { DokkaBase().outputWriter to { _ -> files }, DokkaBase().locationProviderFactory to ::DefaultLocationProviderFactory, DokkaBase().htmlPreprocessors to { _ -> RootCreator }, - DokkaBase().externalLocationProviderFactory to { _ -> ::JavadocExternalLocationProviderFactory }, - DokkaBase().externalLocationProviderFactory to { _ -> ::DokkaExternalLocationProviderFactory }, + DokkaBase().externalLocationProviderFactory to { ::JavadocExternalLocationProviderFactory }, + DokkaBase().externalLocationProviderFactory to { ::DokkaExternalLocationProviderFactory }, sourceSetCache = SourceSetCache(), - testConfiguration = DokkaConfigurationImpl("", "", false, null, emptyList(), emptyList(), emptyList(), emptyMap(), emptyList()) + testConfiguration = DokkaConfigurationImpl("", "", null, false, emptyList(), emptyList(), emptyMap(), emptyList()) ) protected val renderedContent: Element by lazy { diff --git a/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt b/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt index fa129760..b10202bb 100644 --- a/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/DivergentTest.kt @@ -10,9 +10,9 @@ import org.junit.jupiter.api.Test import renderers.* class DivergentTest : RenderingOnlyTestBase() { - private val js = SourceSetData("root", "JS", Platform.js, listOf(SourceRootImpl("pl1"))) - private val jvm = SourceSetData("root", "JVM", Platform.jvm, listOf(SourceRootImpl("pl1"))) - private val native = SourceSetData("root", "NATIVE", Platform.native, listOf(SourceRootImpl("pl1"))) + private val js = SourceSetData("root", "js", "JS", Platform.js, listOf(SourceRootImpl("pl1"))) + private val jvm = SourceSetData("root", "jvm", "JVM", Platform.jvm, listOf(SourceRootImpl("pl1"))) + private val native = SourceSetData("root", "native", "NATIVE", Platform.native, listOf(SourceRootImpl("pl1"))) @Test fun simpleWrappingCase() { diff --git a/plugins/base/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt b/plugins/base/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt index c1dc40a7..878f442b 100644 --- a/plugins/base/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt +++ b/plugins/base/src/test/kotlin/renderers/html/SourceSetDependentHintTest.kt @@ -12,9 +12,9 @@ import renderers.TestPage import renderers.match class SourceSetDependentHintTest : RenderingOnlyTestBase() { - private val pl1 = SourceSetData("root", "pl1", Platform.js, listOf(SourceRootImpl("pl1"))) - private val pl2 = SourceSetData("root","pl2", Platform.jvm, listOf(SourceRootImpl("pl1"))) - private val pl3 = SourceSetData("root","pl3", Platform.native, listOf(SourceRootImpl("pl1"))) + private val pl1 = SourceSetData("root", "pl1", "pl3",Platform.js, listOf(SourceRootImpl("pl1"))) + private val pl2 = SourceSetData("root","pl2", "pl3", Platform.jvm, listOf(SourceRootImpl("pl1"))) + private val pl3 = SourceSetData("root","pl3", "pl3", Platform.native, listOf(SourceRootImpl("pl1"))) @Test fun platformIndependentCase() { diff --git a/plugins/base/src/test/kotlin/utils/ModelUtils.kt b/plugins/base/src/test/kotlin/utils/ModelUtils.kt index f65258b1..9697a843 100644 --- a/plugins/base/src/test/kotlin/utils/ModelUtils.kt +++ b/plugins/base/src/test/kotlin/utils/ModelUtils.kt @@ -9,7 +9,6 @@ abstract class AbstractModelTest(val path: String? = null, val pkg: String) : Mo fun inlineModelTest( query: String, platform: String = "jvm", - targetList: List = listOf("jvm"), prependPackage: Boolean = true, cleanupOutput: Boolean = true, pluginsOverrides: List = emptyList(), @@ -21,7 +20,6 @@ abstract class AbstractModelTest(val path: String? = null, val pkg: String) : Mo pass { sourceRoots = listOf("src/") analysisPlatform = platform - targets = targetList } } } diff --git a/plugins/gfm/src/main/kotlin/GfmPlugin.kt b/plugins/gfm/src/main/kotlin/GfmPlugin.kt index cc79291c..b10a45b8 100644 --- a/plugins/gfm/src/main/kotlin/GfmPlugin.kt +++ b/plugins/gfm/src/main/kotlin/GfmPlugin.kt @@ -120,7 +120,7 @@ open class CommonmarkRenderer( append(distinct.keys.single()) else distinct.forEach { text, platforms -> - append(platforms.joinToString(prefix = " [", postfix = "] $text") { "${it.moduleName}/${it.sourceSetName}" }) + append(platforms.joinToString(prefix = " [", postfix = "] $text") { "${it.moduleName}/${it.sourceSetID}" }) } } diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index be42bc79..d217f83e 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -35,24 +35,22 @@ open class GlobalArguments(parser: DokkaArgumentsParser) : DokkaConfiguration { } } - override val generateIndexPages: Boolean by parser.singleFlag( - listOf("-generateIndexPages"), - "Generate index page" - ) - override val cacheRoot: String? by parser.stringOption( listOf("-cacheRoot"), "Path to cache folder, or 'default' to use ~/.cache/dokka, if not provided caching is disabled", null ) - override val impliedPlatforms: List = emptyList() + override val offlineMode: Boolean by parser.singleFlag( + listOf("-offlineMode"), + "Offline mode (do not download package lists from the Internet)" + ) override val passesConfigurations: List by parser.repeatableFlag( listOf("-pass"), "Single dokka pass" ) { - Arguments(parser).also { if(it.moduleName.isEmpty()) DokkaConsoleLogger.warn("Not specified module name. It can result in unexpected behaviour while including documentation for module") } + Arguments(parser).also { if (it.moduleName.isEmpty()) DokkaConsoleLogger.warn("Not specified module name. It can result in unexpected behaviour while including documentation for module") } } override val modules: List = emptyList() @@ -67,12 +65,17 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi "" ) - override val sourceSetName: String by parser.stringOption( - listOf("-sourceSetName"), - "Name of the source set", - "main" + override val displayName: String by parser.stringOption( + listOf("-displayName"), + "Name displayed in the generated documentation", + "" ) + override val sourceSetID: String by parser.stringOption( + listOf("-sourceSetID"), + "Source set ID used for declaring dependent source sets", + "main" + ) override val classpath: List by parser.repeatableOption( listOf("-classpath"), @@ -84,11 +87,6 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi "Source file or directory (allows many paths separated by the system path separator)" ) { SourceRootImpl(it) } - override val dependentSourceRoots: List by parser.repeatableOption( - listOf("-dependentRoots"), - "Source roots of dependent source sets" - ) { SourceRootImpl(it) } - override val dependentSourceSets: List by parser.repeatableOption( listOf("-dependentSets"), "Names of dependent source sets" @@ -163,16 +161,6 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi "" ) - override val sinceKotlin: String? by parser.stringOption( - listOf("-sinceKotlin"), - "Kotlin Api version to use as base version, if none specified", - null - ) - - override val collectInheritedExtensionsFromLibraries: Boolean by parser.singleFlag( - listOf("-collectInheritedExtensionsFromLibraries"), - "Search for applicable extensions in libraries" - ) override val analysisPlatform: Platform by parser.singleOption( listOf("-analysisPlatform"), @@ -181,10 +169,6 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi { Platform.DEFAULT } ) - override val targets: List by parser.repeatableOption( - listOf("-target"), - "Generation targets" - ) override val perPackageOptions: MutableList by parser.singleOption( listOf("-packageOptions"), @@ -215,16 +199,16 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi object MainKt { fun defaultLinks(config: DokkaConfiguration.PassConfiguration): MutableList = mutableListOf().apply { - if (!config.noJdkLink) - this += DokkaConfiguration.ExternalDocumentationLink - .Builder("https://docs.oracle.com/javase/${config.jdkVersion}/docs/api/") - .build() - - if (!config.noStdlibLink) - this += DokkaConfiguration.ExternalDocumentationLink - .Builder("https://kotlinlang.org/api/latest/jvm/stdlib/") - .build() - } + if (!config.noJdkLink) + this += DokkaConfiguration.ExternalDocumentationLink + .Builder("https://docs.oracle.com/javase/${config.jdkVersion}/docs/api/") + .build() + + if (!config.noStdlibLink) + this += DokkaConfiguration.ExternalDocumentationLink + .Builder("https://kotlinlang.org/api/latest/jvm/stdlib/") + .build() + } fun parseLinks(links: String): List { val (parsedLinks, parsedOfflineLinks) = links.split("^^") diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt index c69c6f67..44a0635f 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt @@ -1,9 +1,5 @@ package org.jetbrains.dokka.gradle -import com.android.build.gradle.* -import com.android.build.gradle.api.BaseVariant -import com.android.builder.core.BuilderConstants -import org.gradle.api.NamedDomainObjectCollection import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.UnknownDomainObjectException @@ -13,57 +9,60 @@ import org.gradle.api.plugins.JavaPluginConvention import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.compile.AbstractCompile import org.jetbrains.dokka.ReflectDsl -import org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension import org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension -import org.jetbrains.kotlin.gradle.plugin.* +import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation +import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import java.io.File import java.io.Serializable class ConfigurationExtractor(private val project: Project) { - fun extractConfiguration(targetName: String, variantName: String?) = - extractFromKotlinProject(targetName, variantName) - - fun extractFromKotlinProject(sourceSetName: String, variantName: String?): PlatformData? { + fun extractConfiguration(sourceSetName: String): PlatformData? { val projectExtension = project.extensions.getByType(KotlinProjectExtension::class.java) val sourceSet = projectExtension.sourceSets.findByName(sourceSetName) ?: run { project.logger.error("No source set with name '$sourceSetName' found"); return null } val compilation = when (projectExtension) { - is KotlinMultiplatformExtension -> projectExtension.targets.flatMap { it.compilations } - .find { it.kotlinSourceSets.contains(sourceSet) } + is KotlinMultiplatformExtension -> { + val targets = projectExtension.targets.flatMap { it.compilations } + targets.find { it.name == sourceSetName } ?: targets.find { it.kotlinSourceSets.contains(sourceSet) } + } is KotlinSingleTargetExtension -> projectExtension.target.compilations.find { it.kotlinSourceSets.contains(sourceSet) } else -> null - } ?: run { project.logger.error("No compilation found for set with name '$sourceSetName'"); return null } + } + + val sourceRoots = sourceSet.sourceFiles + val classpath = compilation?.classpath + ?: sourceRoots + sourceSet.allParentSourceFiles() - val classpath = compilation.compileDependencyFiles.files.filter { it.exists() } - val dependencies = (compilation.allKotlinSourceSets - sourceSet).flatMap { it.kotlin.sourceDirectories } return PlatformData( sourceSetName, - classpath, - sourceSet.kotlin.sourceDirectories.filter { it.exists() }.toList(), - dependencies, - sourceSet.dependsOn.map { it.name }, - compilation.target.targetName + classpath.filter { it.exists() }, + sourceRoots, + sourceSet.dependsOn.map { it.name }, + compilation?.target?.platformType?.name ?: "common" ) } + private fun KotlinSourceSet.allParentSourceFiles(): List = + sourceFiles + dependsOn.flatMap { it.allParentSourceFiles() } + fun extractFromJavaPlugin(): PlatformData? = project.convention.findPlugin(JavaPluginConvention::class.java) ?.run { sourceSets.findByName(SourceSet.MAIN_SOURCE_SET_NAME)?.allSource?.srcDirs } - ?.let { PlatformData(null, emptyList(), it.toList(), emptyList(), emptyList(), "") } + ?.let { PlatformData(null, emptyList(), it.toList(), emptyList(), "") } - fun extractFromKotlinTasks(passName: String, kotlinTasks: List): PlatformData? = + fun extractFromKotlinTasks(kotlinTasks: List): List = try { - kotlinTasks.find { it.toString() == passName }?.let { extractFromKotlinTask(it) } + kotlinTasks.map { extractFromKotlinTask(it) } } catch (e: Throwable) { when (e) { is UnknownDomainObjectException, is NoClassDefFoundError, is ClassNotFoundException -> - extractFromKotlinTasksTheHardWay(passName, kotlinTasks) + listOfNotNull(extractFromKotlinTasksTheHardWay(kotlinTasks)) else -> throw e } } @@ -80,18 +79,17 @@ class ConfigurationExtractor(private val project: Project) { .flatMap { it.compilations }.firstOrNull { it.compileKotlinTask == task } else -> throw e } - }.let { + }.let { compilation -> PlatformData( task.name, - getClasspath(it), - getSourceSet(it), - getDependentSourceSetRoots(it), - getDependentSourceSet(it).map { it.name }, - it?.platformType?.toString() ?: "" + compilation?.classpath.orEmpty(), + compilation?.sourceFiles.orEmpty(), + compilation?.dependentSourceSets?.map { it.name }.orEmpty(), + compilation?.platformType?.toString() ?: "" ) } - private fun extractFromKotlinTasksTheHardWay(passName: String, kotlinTasks: List): PlatformData? { + private fun extractFromKotlinTasksTheHardWay(kotlinTasks: List): PlatformData? { val allClasspath = mutableSetOf() var allClasspathFileCollection: FileCollection = project.files() val allSourceRoots = mutableSetOf() @@ -128,93 +126,41 @@ class ConfigurationExtractor(private val project: Project) { } classpath.addAll(project.files(allClasspath).toList()) - return PlatformData(null, classpath, allSourceRoots.toList(), emptyList(), emptyList(),"") + return PlatformData(null, classpath, allSourceRoots.toList(), emptyList(), "") } - private fun getSourceSet(target: KotlinTarget, variantName: String? = null): List = - if (variantName != null) - getSourceSet(getCompilation(target, variantName)) - else - getSourceSet(getMainCompilation(target)) - - private fun getClasspath(target: KotlinTarget, variantName: String? = null): List = - if (target.isAndroidTarget()) { - if (variantName != null) - getClasspathFromAndroidTask(getCompilation(target, variantName)) - else - getClasspathFromAndroidTask(getMainCompilation(target)) - } else { - getClasspath(getMainCompilation(target)) - } - - private fun getSourceSet(compilation: KotlinCompilation<*>?): List = compilation - ?.kotlinSourceSets - ?.flatMap { it.kotlin.sourceDirectories } - ?.filter { it.exists() } - .orEmpty() + private val KotlinCompilation<*>.sourceFiles: List + get() = kotlinSourceSets.flatMap { it.sourceFiles } - private fun getDependentSourceSet(compilation: KotlinCompilation<*>?) = compilation - ?.let { it.allKotlinSourceSets - it.kotlinSourceSets }.orEmpty() + private val KotlinSourceSet.sourceFiles: List + get() = kotlin.sourceDirectories.filter { it.exists() }.toList() - private fun getDependentSourceSetRoots(compilation: KotlinCompilation<*>?): List = - getDependentSourceSet(compilation)?.flatMap { it.kotlin.sourceDirectories } - .filter { it.exists() } + private val KotlinCompilation<*>.dependentSourceSets: Set + get() = (allKotlinSourceSets - kotlinSourceSets) - private fun getClasspath(compilation: KotlinCompilation<*>?): List = compilation - ?.compileDependencyFiles - ?.files - ?.toList() - ?.filter { it.exists() } - .orEmpty() + private val KotlinCompilation<*>.classpath: List + get() = if (target.isAndroidTarget()) { + getClasspathFromAndroidTask(this) + } else { + getClasspathFromRegularTask(this) + } // This is a workaround for KT-33893 private fun getClasspathFromAndroidTask(compilation: KotlinCompilation<*>): List = (compilation .compileKotlinTask as? KotlinCompile) - ?.classpath?.files?.toList() ?: getClasspath(compilation) - - private fun getMainCompilation(target: KotlinTarget) = - getCompilation(target, getMainCompilationName(target)) - - private fun getCompilation(target: KotlinTarget, name: String) = - target.compilations.getByName(name) - - private fun getMainCompilationName(target: KotlinTarget) = if (target.isAndroidTarget()) - getVariants(project).filter { it.buildType.name == BuilderConstants.RELEASE }.map { it.name }.first() - else - KotlinCompilation.MAIN_COMPILATION_NAME - - private fun getVariants(project: Project): Set { - val androidExtension = project.extensions.getByName("android") - val baseVariants = when (androidExtension) { - is AppExtension -> androidExtension.applicationVariants.toSet() - is LibraryExtension -> { - androidExtension.libraryVariants.toSet() + - if (androidExtension is FeatureExtension) { - androidExtension.featureVariants.toSet() - } else { - emptySet() - } - } - is TestExtension -> androidExtension.applicationVariants.toSet() - else -> emptySet() - } - val testVariants = if (androidExtension is TestedExtension) { - androidExtension.testVariants.toSet() + androidExtension.unitTestVariants.toSet() - } else { - emptySet() - } - - return baseVariants + testVariants - } + ?.classpath?.files?.toList() ?: getClasspathFromRegularTask(compilation) - private fun getPlatformName(platform: KotlinPlatformType): String = - if (platform == KotlinPlatformType.androidJvm) KotlinPlatformType.jvm.toString() else platform.toString() + private fun getClasspathFromRegularTask(compilation: KotlinCompilation<*>): List = + compilation + .compileDependencyFiles + .files + .toList() + .filter { it.exists() } data class PlatformData( val name: String?, val classpath: List, val sourceRoots: List, - val dependentSourceRoots: List, val dependentSourceSets: List, val platform: String ) : Serializable diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt index f4fa7aaa..8c4e0c4c 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTask.kt @@ -20,7 +20,7 @@ open class DokkaCollectorTask : DefaultTask() { @TaskAction fun collect() { - val passesConfigurations = getProjects(project).filter { it.name in modules }.map { + val passesConfigurations = getProjects(project).filter { it.name in modules }.mapNotNull { val task = try { it.tasks.getByName(DOKKA_TASK_NAME, DokkaTask::class) } catch (e: UnknownTaskException) { @@ -33,12 +33,11 @@ open class DokkaCollectorTask : DefaultTask() { outputDir = outputDirectory cacheRoot = passesConfigurations.first().cacheRoot format = passesConfigurations.first().format - generateIndexPages = passesConfigurations.first().generateIndexPages } configuration = passesConfigurations.fold(initial) { acc, it: GradleDokkaConfigurationImpl -> - if(acc.format != it.format || acc.generateIndexPages != it.generateIndexPages || acc.cacheRoot != it.cacheRoot) - throw IllegalStateException("Dokka task configurations differ on core arguments (format, generateIndexPages, cacheRoot)") + if(acc.format != it.format || acc.cacheRoot != it.cacheRoot) + throw IllegalStateException("Dokka task configurations differ on core arguments (format, cacheRoot)") acc.passesConfigurations = acc.passesConfigurations + it.passesConfigurations acc.pluginsClasspath = (acc.pluginsClasspath + it.pluginsClasspath).distinct() acc diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt index a1bfdb96..2ef85de2 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaMultimoduleTask.kt @@ -35,9 +35,9 @@ open class DokkaMultimoduleTask : DefaultTask(), Configurable { System.setProperty(DokkaTask.COLORS_ENABLED_PROPERTY, "false") try { - loadFatJar() + loadCore() val bootstrapClass = - ClassloaderContainer.fatJarClassLoader!