aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.idea/compiler.xml20
-rw-r--r--.idea/kotlinc.xml2
-rw-r--r--.idea/modules.xml64
-rw-r--r--core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt3
-rw-r--r--core/src/main/kotlin/Formats/FormatService.kt2
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt6
-rw-r--r--core/src/main/kotlin/Generation/DokkaGenerator.kt4
-rw-r--r--core/src/main/kotlin/Generation/FileGenerator.kt1
-rw-r--r--core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt4
-rw-r--r--core/src/main/kotlin/Java/JavadocParser.kt12
-rw-r--r--core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt6
-rw-r--r--core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt8
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt4
-rw-r--r--core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt3
-rw-r--r--core/src/main/kotlin/Kotlin/KotlinLanguageService.kt2
-rw-r--r--core/src/main/kotlin/Languages/JavaLanguageService.kt8
-rw-r--r--core/src/main/kotlin/Model/Content.kt8
-rw-r--r--core/src/main/kotlin/Model/DocumentationNode.kt8
-rw-r--r--core/src/main/kotlin/Model/DocumentationReference.kt6
-rw-r--r--core/src/main/kotlin/Model/PackageDocs.kt2
-rw-r--r--core/src/main/kotlin/Model/SourceLinks.kt2
-rw-r--r--core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt6
-rw-r--r--core/src/main/kotlin/Utilities/DokkaModules.kt6
-rw-r--r--core/src/main/kotlin/Utilities/ServiceLocator.kt4
-rw-r--r--core/src/main/kotlin/javadoc/docbase.kt11
-rw-r--r--core/src/test/kotlin/TestAPI.kt1
-rw-r--r--core/src/test/kotlin/format/HtmlFormatTest.kt1
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt1
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt1
-rw-r--r--core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt4
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt1
-rw-r--r--core/src/test/kotlin/issues/IssuesTest.kt1
-rw-r--r--core/src/test/kotlin/javadoc/JavadocTest.kt5
-rw-r--r--core/src/test/kotlin/model/FunctionTest.kt1
-rw-r--r--runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt2
-rw-r--r--runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt9
-rw-r--r--runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt2
-rw-r--r--runners/maven-plugin/src/main/kotlin/DokkaMojo.kt4
38 files changed, 113 insertions, 122 deletions
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 9700d3cc..fb727eec 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -40,6 +40,26 @@
<module name="integration_test" target="1.8" />
<module name="maven-plugin_main" target="1.8" />
<module name="maven-plugin_test" target="1.8" />
+ <module name="org.jetbrains.dokka.android-gradle-plugin.main" target="1.8" />
+ <module name="org.jetbrains.dokka.android-gradle-plugin.test" target="1.8" />
+ <module name="org.jetbrains.dokka.ant.main" target="1.8" />
+ <module name="org.jetbrains.dokka.ant.test" target="1.8" />
+ <module name="org.jetbrains.dokka.buildSrc.main" target="1.8" />
+ <module name="org.jetbrains.dokka.buildSrc.test" target="1.8" />
+ <module name="org.jetbrains.dokka.cli.main" target="1.8" />
+ <module name="org.jetbrains.dokka.cli.test" target="1.8" />
+ <module name="org.jetbrains.dokka.core.main" target="1.8" />
+ <module name="org.jetbrains.dokka.core.test" target="1.8" />
+ <module name="org.jetbrains.dokka.fatjar.main" target="1.8" />
+ <module name="org.jetbrains.dokka.fatjar.test" target="1.8" />
+ <module name="org.jetbrains.dokka.gradle-integration-tests.main" target="1.8" />
+ <module name="org.jetbrains.dokka.gradle-integration-tests.test" target="1.8" />
+ <module name="org.jetbrains.dokka.gradle-plugin.main" target="1.8" />
+ <module name="org.jetbrains.dokka.gradle-plugin.test" target="1.8" />
+ <module name="org.jetbrains.dokka.integration.main" target="1.8" />
+ <module name="org.jetbrains.dokka.integration.test" target="1.8" />
+ <module name="org.jetbrains.dokka.maven-plugin.main" target="1.8" />
+ <module name="org.jetbrains.dokka.maven-plugin.test" target="1.8" />
</bytecodeTargetLevel>
</component>
</project> \ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
index b072dc00..38d23597 100644
--- a/.idea/kotlinc.xml
+++ b/.idea/kotlinc.xml
@@ -6,6 +6,6 @@
</component>
<component name="KotlinCommonCompilerArguments">
<option name="apiVersion" value="1.1" />
- <option name="languageVersion" value="1.1" />
+ <option name="languageVersion" value="1.2" />
</component>
</project> \ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 7e6aaef5..3c92c5db 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -2,38 +2,38 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin.iml" group="runners/android-gradle-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_main.iml" group="runners/android-gradle-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/android-gradle-plugin_test.iml" group="runners/android-gradle-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/ant/ant.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/ant/ant.iml" group="runners/ant" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/ant/ant_main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/ant/ant_main.iml" group="runners/ant" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/ant/ant_test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/ant/ant_test.iml" group="runners/ant" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/buildSrc.iml" filepath="$PROJECT_DIR$/.idea/modules/buildSrc.iml" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/buildSrc_main.iml" filepath="$PROJECT_DIR$/.idea/modules/buildSrc_main.iml" group="buildSrc" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/buildSrc_test.iml" filepath="$PROJECT_DIR$/.idea/modules/buildSrc_test.iml" group="buildSrc" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/cli/cli.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/cli/cli.iml" group="runners/cli" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/cli/cli_main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/cli/cli_main.iml" group="runners/cli" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/cli/cli_test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/cli/cli_test.iml" group="runners/cli" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core.iml" group="core" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core_main.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core_main.iml" group="core" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/core/core_test.iml" filepath="$PROJECT_DIR$/.idea/modules/core/core_test.iml" group="core" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/dokka.iml" filepath="$PROJECT_DIR$/.idea/modules/dokka.iml" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/fatjar/fatjar.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/fatjar/fatjar.iml" group="runners/fatjar" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/fatjar/fatjar_main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/fatjar/fatjar_main.iml" group="runners/fatjar" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/fatjar/fatjar_test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/fatjar/fatjar_test.iml" group="runners/fatjar" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/gradle-integration-tests.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/gradle-integration-tests.iml" group="runners/gradle-integration-tests" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/gradle-integration-tests_main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/gradle-integration-tests_main.iml" group="runners/gradle-integration-tests" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/gradle-integration-tests_test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/gradle-integration-tests_test.iml" group="runners/gradle-integration-tests" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/gradle-plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/gradle-plugin.iml" group="runners/gradle-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/gradle-plugin_main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/gradle-plugin_main.iml" group="runners/gradle-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/gradle-plugin_test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/gradle-plugin_test.iml" group="runners/gradle-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/integration/integration.iml" filepath="$PROJECT_DIR$/.idea/modules/integration/integration.iml" group="integration" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/integration/integration_main.iml" filepath="$PROJECT_DIR$/.idea/modules/integration/integration_main.iml" group="integration" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/integration/integration_test.iml" filepath="$PROJECT_DIR$/.idea/modules/integration/integration_test.iml" group="integration" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/maven-plugin/maven-plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/maven-plugin/maven-plugin.iml" group="runners/maven-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/maven-plugin/maven-plugin_main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/maven-plugin/maven-plugin_main.iml" group="runners/maven-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/maven-plugin/maven-plugin_test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/maven-plugin/maven-plugin_test.iml" group="runners/maven-plugin" />
- <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/runners.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/runners.iml" group="runners" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/org.jetbrains.dokka.android-gradle-plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/org.jetbrains.dokka.android-gradle-plugin.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/org.jetbrains.dokka.android-gradle-plugin.main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/org.jetbrains.dokka.android-gradle-plugin.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/org.jetbrains.dokka.android-gradle-plugin.test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/android-gradle-plugin/org.jetbrains.dokka.android-gradle-plugin.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/ant/org.jetbrains.dokka.ant.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/ant/org.jetbrains.dokka.ant.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/ant/org.jetbrains.dokka.ant.main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/ant/org.jetbrains.dokka.ant.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/ant/org.jetbrains.dokka.ant.test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/ant/org.jetbrains.dokka.ant.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/org.jetbrains.dokka.buildSrc.iml" filepath="$PROJECT_DIR$/.idea/modules/org.jetbrains.dokka.buildSrc.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/org.jetbrains.dokka.buildSrc.main.iml" filepath="$PROJECT_DIR$/.idea/modules/org.jetbrains.dokka.buildSrc.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/org.jetbrains.dokka.buildSrc.test.iml" filepath="$PROJECT_DIR$/.idea/modules/org.jetbrains.dokka.buildSrc.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/cli/org.jetbrains.dokka.cli.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/cli/org.jetbrains.dokka.cli.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/cli/org.jetbrains.dokka.cli.main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/cli/org.jetbrains.dokka.cli.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/cli/org.jetbrains.dokka.cli.test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/cli/org.jetbrains.dokka.cli.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/core/org.jetbrains.dokka.core.iml" filepath="$PROJECT_DIR$/.idea/modules/core/org.jetbrains.dokka.core.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/core/org.jetbrains.dokka.core.main.iml" filepath="$PROJECT_DIR$/.idea/modules/core/org.jetbrains.dokka.core.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/core/org.jetbrains.dokka.core.test.iml" filepath="$PROJECT_DIR$/.idea/modules/core/org.jetbrains.dokka.core.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/org.jetbrains.dokka.dokka.iml" filepath="$PROJECT_DIR$/.idea/modules/org.jetbrains.dokka.dokka.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/fatjar/org.jetbrains.dokka.fatjar.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/fatjar/org.jetbrains.dokka.fatjar.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/fatjar/org.jetbrains.dokka.fatjar.main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/fatjar/org.jetbrains.dokka.fatjar.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/fatjar/org.jetbrains.dokka.fatjar.test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/fatjar/org.jetbrains.dokka.fatjar.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/org.jetbrains.dokka.gradle-integration-tests.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/org.jetbrains.dokka.gradle-integration-tests.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/org.jetbrains.dokka.gradle-integration-tests.main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/org.jetbrains.dokka.gradle-integration-tests.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/org.jetbrains.dokka.gradle-integration-tests.test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-integration-tests/org.jetbrains.dokka.gradle-integration-tests.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/org.jetbrains.dokka.gradle-plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/org.jetbrains.dokka.gradle-plugin.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/org.jetbrains.dokka.gradle-plugin.main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/org.jetbrains.dokka.gradle-plugin.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/org.jetbrains.dokka.gradle-plugin.test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/gradle-plugin/org.jetbrains.dokka.gradle-plugin.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/integration/org.jetbrains.dokka.integration.iml" filepath="$PROJECT_DIR$/.idea/modules/integration/org.jetbrains.dokka.integration.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/integration/org.jetbrains.dokka.integration.main.iml" filepath="$PROJECT_DIR$/.idea/modules/integration/org.jetbrains.dokka.integration.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/integration/org.jetbrains.dokka.integration.test.iml" filepath="$PROJECT_DIR$/.idea/modules/integration/org.jetbrains.dokka.integration.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/maven-plugin/org.jetbrains.dokka.maven-plugin.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/maven-plugin/org.jetbrains.dokka.maven-plugin.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/maven-plugin/org.jetbrains.dokka.maven-plugin.main.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/maven-plugin/org.jetbrains.dokka.maven-plugin.main.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/maven-plugin/org.jetbrains.dokka.maven-plugin.test.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/maven-plugin/org.jetbrains.dokka.maven-plugin.test.iml" />
+ <module fileurl="file://$PROJECT_DIR$/.idea/modules/runners/org.jetbrains.dokka.runners.iml" filepath="$PROJECT_DIR$/.idea/modules/runners/org.jetbrains.dokka.runners.iml" />
</modules>
</component>
</project> \ No newline at end of file
diff --git a/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt b/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt
index 4f6a7c76..1ad68643 100644
--- a/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt
+++ b/core/src/main/kotlin/Analysis/CoreProjectFileIndex.kt
@@ -166,8 +166,7 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List<Cont
private val sdk: Sdk = object : Sdk, RootProvider {
override fun getFiles(rootType: OrderRootType): Array<out VirtualFile> = classpathRoots
- .map { StandardFileSystems.local().findFileByPath(it.file.path) }
- .filterNotNull()
+ .mapNotNull { StandardFileSystems.local().findFileByPath(it.file.path) }
.toTypedArray()
override fun addRootSetChangedListener(p0: RootProvider.RootSetChangedListener) {
diff --git a/core/src/main/kotlin/Formats/FormatService.kt b/core/src/main/kotlin/Formats/FormatService.kt
index 63f25008..8f4855e3 100644
--- a/core/src/main/kotlin/Formats/FormatService.kt
+++ b/core/src/main/kotlin/Formats/FormatService.kt
@@ -22,7 +22,7 @@ interface FormatService {
}
interface FormattedOutputBuilder {
- /** Appends formatted content to [StringBuilder](to) using specified [location] */
+ /** Appends formatted content */
fun appendNodes(nodes: Iterable<DocumentationNode>)
}
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index 952e14cf..bd27448a 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -174,9 +174,9 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
}
when (content) {
is ContentBlockSampleCode ->
- appendSampleBlockCode(content.language, content.importsBlock::appendBlockCodeContent, { content.appendBlockCodeContent() })
+ appendSampleBlockCode(content.language, content.importsBlock::appendBlockCodeContent) { content.appendBlockCodeContent() }
is ContentBlockCode ->
- appendBlockCode(content.language, { content.appendBlockCodeContent() })
+ appendBlockCode(content.language) { content.appendBlockCodeContent() }
}
}
is ContentHeading -> appendHeader(content.level) { appendContent(content.children) }
@@ -557,7 +557,7 @@ abstract class StructuredOutputBuilder(val to: StringBuilder,
if (node.kind == NodeKind.Module) {
appendHeader(3) { to.append("Index") }
node.members(NodeKind.AllTypes).singleOrNull()?.let { allTypes ->
- appendLink(link(node, allTypes, { "All Types" }))
+ appendLink(link(node, allTypes) { "All Types" })
}
}
}
diff --git a/core/src/main/kotlin/Generation/DokkaGenerator.kt b/core/src/main/kotlin/Generation/DokkaGenerator.kt
index 09e5cedf..59b9dc5e 100644
--- a/core/src/main/kotlin/Generation/DokkaGenerator.kt
+++ b/core/src/main/kotlin/Generation/DokkaGenerator.kt
@@ -140,9 +140,7 @@ fun buildDocumentationModule(injector: Injector,
val analyzer = resolutionFacade.getFrontendService(LazyTopDownAnalyzer::class.java)
analyzer.analyzeDeclarations(TopDownAnalysisMode.TopLevelDeclarations, fragmentFiles)
- val fragments = fragmentFiles
- .map { resolutionFacade.resolveSession.getPackageFragment(it.packageFqName) }
- .filterNotNull()
+ val fragments = fragmentFiles.mapNotNull { resolutionFacade.resolveSession.getPackageFragment(it.packageFqName) }
.distinct()
val packageDocs = injector.getInstance(PackageDocs::class.java)
diff --git a/core/src/main/kotlin/Generation/FileGenerator.kt b/core/src/main/kotlin/Generation/FileGenerator.kt
index b7c6cf63..aff07648 100644
--- a/core/src/main/kotlin/Generation/FileGenerator.kt
+++ b/core/src/main/kotlin/Generation/FileGenerator.kt
@@ -2,7 +2,6 @@ package org.jetbrains.dokka
import com.google.inject.Inject
import com.google.inject.name.Named
-import org.jetbrains.kotlin.utils.fileUtils.withReplacedExtensionOrNull
import java.io.File
import java.io.FileOutputStream
import java.io.IOException
diff --git a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
index cf2b0514..624c5fdc 100644
--- a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
+++ b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
@@ -18,7 +18,7 @@ fun getSignature(element: PsiElement?) = when(element) {
is PsiField -> element.containingClass!!.qualifiedName + "$" + element.name
is PsiMethod ->
element.containingClass!!.qualifiedName + "$" + element.name + "(" +
- element.parameterList.parameters.map { it.type.typeSignature() }.joinToString(",") + ")"
+ element.parameterList.parameters.joinToString(",") { it.type.typeSignature() } + ")"
else -> null
}
@@ -291,7 +291,7 @@ class JavaPsiDocumentationBuilder : JavaDocumentationBuilder {
}
fun hasSuppressDocTag(element: Any?): Boolean {
- val declaration = (element as? KtLightDeclaration<*, *>)?.kotlinOrigin as? KtDeclaration ?: return false
+ val declaration = (element as? KtLightDeclaration<*, *>)?.kotlinOrigin ?: return false
return PsiTreeUtil.findChildrenOfType(declaration.docComment, KDocTag::class.java).any { it.knownTag == KDocKnownTag.SUPPRESS }
}
diff --git a/core/src/main/kotlin/Java/JavadocParser.kt b/core/src/main/kotlin/Java/JavadocParser.kt
index c25f5813..ea3a5963 100644
--- a/core/src/main/kotlin/Java/JavadocParser.kt
+++ b/core/src/main/kotlin/Java/JavadocParser.kt
@@ -23,8 +23,7 @@ interface JavaDocumentationParser {
class JavadocParser(private val refGraph: NodeReferenceGraph,
private val logger: DokkaLogger) : JavaDocumentationParser {
override fun parseDocumentation(element: PsiNamedElement): JavadocParseResult {
- val docComment = (element as? PsiDocCommentOwner)?.docComment
- if (docComment == null) return JavadocParseResult.Empty
+ val docComment = (element as? PsiDocCommentOwner)?.docComment ?: return JavadocParseResult.Empty
val result = MutableContent()
var deprecatedContent: Content? = null
val para = ContentParagraph()
@@ -101,7 +100,7 @@ class JavadocParser(private val refGraph: NodeReferenceGraph,
private fun createLink(element: Element): ContentBlock {
val docref = element.attr("docref")
if (docref != null) {
- return ContentNodeLazyLink(docref, { -> refGraph.lookupOrWarn(docref, logger)})
+ return ContentNodeLazyLink(docref) { refGraph.lookupOrWarn(docref, logger)}
}
val href = element.attr("href")
if (href != null) {
@@ -112,15 +111,12 @@ class JavadocParser(private val refGraph: NodeReferenceGraph,
}
private fun MutableContent.convertSeeTag(tag: PsiDocTag) {
- val linkElement = tag.linkElement()
- if (linkElement == null) {
- return
- }
+ val linkElement = tag.linkElement() ?: return
val seeSection = findSectionByTag(ContentTags.SeeAlso) ?: addSection(ContentTags.SeeAlso, null)
val linkSignature = resolveLink(linkElement)
val text = ContentText(linkElement.text)
if (linkSignature != null) {
- val linkNode = ContentNodeLazyLink(tag.valueElement!!.text, { -> refGraph.lookupOrWarn(linkSignature, logger)})
+ val linkNode = ContentNodeLazyLink(tag.valueElement!!.text) { refGraph.lookupOrWarn(linkSignature, logger)}
linkNode.append(text)
seeSection.append(linkNode)
} else {
diff --git a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt
index ffef399d..da2b7272 100644
--- a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt
+++ b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt
@@ -6,8 +6,6 @@ import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.descriptors.TypeAliasDescriptor
import org.jetbrains.kotlin.idea.kdoc.resolveKDocLink
-import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyPrivateApi
-import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyPublicApi
class DeclarationLinkResolver
@Inject constructor(val resolutionFacade: DokkaResolutionFacade,
@@ -37,14 +35,14 @@ class DeclarationLinkResolver
val signature = descriptorSignatureProvider.signature(symbol)
val referencedAt = fromDescriptor.signatureWithSourceLocation()
- return ContentNodeLazyLink(href, { ->
+ return ContentNodeLazyLink(href) {
val target = refGraph.lookup(signature)
if (target == null) {
logger.warn("Can't find node by signature $signature, referenced at $referencedAt")
}
target
- })
+ }
}
if ("/" in href) {
return ContentExternalLink(href)
diff --git a/core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt b/core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt
index 6e44df74..4d276b5a 100644
--- a/core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt
+++ b/core/src/main/kotlin/Kotlin/DescriptorDocumentationParser.kt
@@ -66,7 +66,7 @@ class DescriptorDocumentationParser
}
val tree = parseMarkdown(kdocText)
val linkMap = LinkMap.buildLinkMap(tree.node, kdocText)
- val content = buildContent(tree, LinkResolver(linkMap, { href -> linkResolver.resolveContentLink(contextDescriptor, href) }), inline)
+ val content = buildContent(tree, LinkResolver(linkMap) { href -> linkResolver.resolveContentLink(contextDescriptor, href) }, inline)
if (kdoc is KDocSection) {
val tags = kdoc.getTags()
tags.forEach {
@@ -79,7 +79,7 @@ class DescriptorDocumentationParser
val section = content.addSection(javadocSectionDisplayName(it.name), it.getSubjectName())
val sectionContent = it.getContent()
val markdownNode = parseMarkdown(sectionContent)
- buildInlineContentTo(markdownNode, section, LinkResolver(linkMap, { href -> linkResolver.resolveContentLink(contextDescriptor, href) }))
+ buildInlineContentTo(markdownNode, section, LinkResolver(linkMap) { href -> linkResolver.resolveContentLink(contextDescriptor, href) })
}
}
}
@@ -114,8 +114,8 @@ class DescriptorDocumentationParser
FqName.fromSegments(listOf("kotlin", "Any")), NoLookupLocation.FROM_IDE)
anyClassDescriptors.forEach {
val anyMethod = (it as ClassDescriptor).getMemberScope(listOf())
- .getDescriptorsFiltered(DescriptorKindFilter.FUNCTIONS, { it == descriptor.name })
- .single()
+ .getDescriptorsFiltered(DescriptorKindFilter.FUNCTIONS) { it == descriptor.name }
+ .single()
val kdoc = anyMethod.findKDoc()
if (kdoc != null) {
return kdoc
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index 7b50fff5..9c726429 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -901,11 +901,11 @@ fun DocumentationNode.getParentForPackageMember(descriptor: DeclarationDescripto
if (extensionClassDescriptor != null && isExtensionForExternalClass(descriptor, extensionClassDescriptor, allFqNames) &&
!ErrorUtils.isError(extensionClassDescriptor)) {
val fqName = DescriptorUtils.getFqNameSafe(extensionClassDescriptor)
- return externalClassNodes.getOrPut(fqName, {
+ return externalClassNodes.getOrPut(fqName) {
val newNode = DocumentationNode(fqName.asString(), Content.Empty, NodeKind.ExternalClass)
append(newNode, RefKind.Member)
newNode
- })
+ }
}
}
return this
diff --git a/core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt
index c7ed8292..21c1ae0f 100644
--- a/core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/KotlinAsJavaDocumentationBuilder.kt
@@ -40,8 +40,7 @@ class KotlinAsJavaDocumentationBuilder
fun PsiClass.isVisibleInDocumentation(): Boolean {
val origin: KtDeclaration = (this as KtLightElement<*, *>).kotlinOrigin as? KtDeclaration ?: return true
- return origin.hasModifier(KtTokens.INTERNAL_KEYWORD) != true &&
- origin.hasModifier(KtTokens.PRIVATE_KEYWORD) != true
+ return !origin.hasModifier(KtTokens.INTERNAL_KEYWORD) && !origin.hasModifier(KtTokens.PRIVATE_KEYWORD)
}
}
diff --git a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
index f33c8c96..597002fb 100644
--- a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
+++ b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt
@@ -55,7 +55,7 @@ class KotlinLanguageService : LanguageService {
}
private fun List<DocumentationNode>.getReceiverKind(): ReceiverKind? {
- val qNames = map { it.getReceiverQName() }.filterNotNull()
+ val qNames = mapNotNull { it.getReceiverQName() }
if (qNames.size != size)
return null
diff --git a/core/src/main/kotlin/Languages/JavaLanguageService.kt b/core/src/main/kotlin/Languages/JavaLanguageService.kt
index 59bedd02..ad66123b 100644
--- a/core/src/main/kotlin/Languages/JavaLanguageService.kt
+++ b/core/src/main/kotlin/Languages/JavaLanguageService.kt
@@ -84,7 +84,7 @@ class JavaLanguageService : LanguageService {
return if (constraints.none())
node.name
else {
- node.name + " extends " + constraints.map { renderType(node) }.joinToString()
+ node.name + " extends " + constraints.joinToString { renderType(node) }
}
}
@@ -97,7 +97,7 @@ class JavaLanguageService : LanguageService {
val typeParameters = node.details(NodeKind.TypeParameter)
if (typeParameters.any()) {
append("<")
- append(typeParameters.map { renderTypeParameter(it) }.joinToString())
+ append(typeParameters.joinToString { renderTypeParameter(it) })
append("> ")
}
}.toString()
@@ -142,9 +142,9 @@ class JavaLanguageService : LanguageService {
val receiver = node.details(NodeKind.Receiver).singleOrNull()
append("(")
if (receiver != null)
- (listOf(receiver) + node.details(NodeKind.Parameter)).map { renderParameter(it) }.joinTo(this)
+ (listOf(receiver) + node.details(NodeKind.Parameter)).joinTo(this) { renderParameter(it) }
else
- node.details(NodeKind.Parameter).map { renderParameter(it) }.joinTo(this)
+ node.details(NodeKind.Parameter).joinTo(this) { renderParameter(it) }
append(")")
}.toString()
diff --git a/core/src/main/kotlin/Model/Content.kt b/core/src/main/kotlin/Model/Content.kt
index 1f5bbc83..ccb5bff3 100644
--- a/core/src/main/kotlin/Model/Content.kt
+++ b/core/src/main/kotlin/Model/Content.kt
@@ -135,10 +135,10 @@ class ContentSection(val tag: String, val subjectName: String?) : ContentBlock()
}
object ContentTags {
- val Description = "Description"
- val SeeAlso = "See Also"
- val Return = "Return"
- val Exceptions = "Exceptions"
+ const val Description = "Description"
+ const val SeeAlso = "See Also"
+ const val Return = "Return"
+ const val Exceptions = "Exceptions"
}
fun content(body: ContentBlock.() -> Unit): ContentBlock {
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt
index da85cabf..3ff1d127 100644
--- a/core/src/main/kotlin/Model/DocumentationNode.kt
+++ b/core/src/main/kotlin/Model/DocumentationNode.kt
@@ -130,10 +130,10 @@ open class DocumentationNode(val name: String,
fun inheritedCompanionObjectMembers(kind: NodeKind): List<DocumentationNode> = inheritedCompanionObjectMembers.filter { it.kind == kind }
fun links(kind: NodeKind): List<DocumentationNode> = links.filter { it.kind == kind }
- fun detail(kind: NodeKind): DocumentationNode = details.filter { it.kind == kind }.single()
- fun detailOrNull(kind: NodeKind): DocumentationNode? = details.filter { it.kind == kind }.singleOrNull()
- fun member(kind: NodeKind): DocumentationNode = members.filter { it.kind == kind }.single()
- fun link(kind: NodeKind): DocumentationNode = links.filter { it.kind == kind }.single()
+ fun detail(kind: NodeKind): DocumentationNode = details.single { it.kind == kind }
+ fun detailOrNull(kind: NodeKind): DocumentationNode? = details.singleOrNull { it.kind == kind }
+ fun member(kind: NodeKind): DocumentationNode = members.single { it.kind == kind }
+ fun link(kind: NodeKind): DocumentationNode = links.single { it.kind == kind }
fun references(kind: RefKind): List<DocumentationReference> = references.filter { it.kind == kind }
fun allReferences(): Set<DocumentationReference> = references
diff --git a/core/src/main/kotlin/Model/DocumentationReference.kt b/core/src/main/kotlin/Model/DocumentationReference.kt
index a968f400..87e7ecea 100644
--- a/core/src/main/kotlin/Model/DocumentationReference.kt
+++ b/core/src/main/kotlin/Model/DocumentationReference.kt
@@ -45,15 +45,15 @@ class NodeReferenceGraph() {
}
fun link(fromNode: DocumentationNode, toSignature: String, kind: RefKind) {
- references.add(PendingDocumentationReference({ -> fromNode}, { -> nodeMap[toSignature]}, kind))
+ references.add(PendingDocumentationReference({ fromNode}, { nodeMap[toSignature]}, kind))
}
fun link(fromSignature: String, toNode: DocumentationNode, kind: RefKind) {
- references.add(PendingDocumentationReference({ -> nodeMap[fromSignature]}, { -> toNode}, kind))
+ references.add(PendingDocumentationReference({ nodeMap[fromSignature]}, { toNode}, kind))
}
fun link(fromSignature: String, toSignature: String, kind: RefKind) {
- references.add(PendingDocumentationReference({ -> nodeMap[fromSignature]}, { -> nodeMap[toSignature]}, kind))
+ references.add(PendingDocumentationReference({ nodeMap[fromSignature]}, { nodeMap[toSignature]}, kind))
}
fun lookup(signature: String) = nodeMap[signature]
diff --git a/core/src/main/kotlin/Model/PackageDocs.kt b/core/src/main/kotlin/Model/PackageDocs.kt
index bb8e98d1..7ba4bdad 100644
--- a/core/src/main/kotlin/Model/PackageDocs.kt
+++ b/core/src/main/kotlin/Model/PackageDocs.kt
@@ -33,7 +33,7 @@ class PackageDocs
targetContent = findTargetContent(headingText.trimStart())
}
} else {
- buildContentTo(it, targetContent, LinkResolver(linkMap, { resolveContentLink(fileName, it, linkResolveContext) }))
+ buildContentTo(it, targetContent, LinkResolver(linkMap) { resolveContentLink(fileName, it, linkResolveContext) })
}
}
} else {
diff --git a/core/src/main/kotlin/Model/SourceLinks.kt b/core/src/main/kotlin/Model/SourceLinks.kt
index 2c75cfda..7575b2b3 100644
--- a/core/src/main/kotlin/Model/SourceLinks.kt
+++ b/core/src/main/kotlin/Model/SourceLinks.kt
@@ -23,7 +23,7 @@ fun DocumentationNode.appendSourceLink(psi: PsiElement?, sourceLinks: List<Sourc
}
}
append(DocumentationNode(url, Content.Empty, NodeKind.SourceUrl),
- RefKind.Detail);
+ RefKind.Detail)
}
if (target != null) {
diff --git a/core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt b/core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt
index 116a5c02..ff11ca02 100644
--- a/core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt
+++ b/core/src/main/kotlin/Samples/DefaultSampleProcessingService.kt
@@ -45,7 +45,7 @@ open class DefaultSampleProcessingService
val text = processSampleBody(psiElement).trim { it == '\n' || it == '\r' }.trimEnd()
val lines = text.split("\n")
val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.min() ?: 0
- val finalText = lines.map { it.drop(indent) }.joinToString("\n")
+ val finalText = lines.joinToString("\n") { it.drop(indent) }
return ContentBlockSampleCode(importsBlock = processImports(psiElement)).apply { append(ContentText(finalText)) }
}
@@ -81,9 +81,7 @@ open class DefaultSampleProcessingService
for (part in parts) {
// short name
val symbolName = Name.identifier(part)
- val partSymbol = currentScope.getContributedDescriptors(DescriptorKindFilter.ALL, { it == symbolName })
- .filter { it.name == symbolName }
- .firstOrNull()
+ val partSymbol = currentScope.getContributedDescriptors(DescriptorKindFilter.ALL) { it == symbolName }.firstOrNull { it.name == symbolName }
if (partSymbol == null) {
symbol = null
diff --git a/core/src/main/kotlin/Utilities/DokkaModules.kt b/core/src/main/kotlin/Utilities/DokkaModules.kt
index 36704918..cead29c9 100644
--- a/core/src/main/kotlin/Utilities/DokkaModules.kt
+++ b/core/src/main/kotlin/Utilities/DokkaModules.kt
@@ -2,14 +2,12 @@ package org.jetbrains.dokka.Utilities
import com.google.inject.Binder
import com.google.inject.Module
-import com.google.inject.Provider
import com.google.inject.TypeLiteral
import com.google.inject.binder.AnnotatedBindingBuilder
+import com.google.inject.binder.ScopedBindingBuilder
import com.google.inject.name.Names
import org.jetbrains.dokka.*
import org.jetbrains.dokka.Formats.FormatDescriptor
-import org.jetbrains.dokka.Model.DescriptorSignatureProvider
-import org.jetbrains.dokka.Samples.SampleProcessingService
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
import java.io.File
import kotlin.reflect.KClass
@@ -77,4 +75,4 @@ inline fun <reified T: Any> Binder.lazyBind(): Lazy<AnnotatedBindingBuilder<T>>
inline infix fun <reified T: Any, TKClass: KClass<out T>> Lazy<AnnotatedBindingBuilder<T>>.toOptional(kClass: TKClass?) =
kClass?.let { value toType it }
-inline infix fun <reified T: Any, TKClass: KClass<out T>> AnnotatedBindingBuilder<T>.toType(kClass: TKClass) = to(kClass.java)
+inline infix fun <reified T: Any, TKClass: KClass<out T>> AnnotatedBindingBuilder<T>.toType(kClass: TKClass): ScopedBindingBuilder = to(kClass.java)
diff --git a/core/src/main/kotlin/Utilities/ServiceLocator.kt b/core/src/main/kotlin/Utilities/ServiceLocator.kt
index 71bfd21b..6f2ebd0f 100644
--- a/core/src/main/kotlin/Utilities/ServiceLocator.kt
+++ b/core/src/main/kotlin/Utilities/ServiceLocator.kt
@@ -15,9 +15,7 @@ object ServiceLocator {
fun <T : Any> lookup(clazz: Class<T>, category: String, implementationName: String): T {
val descriptor = lookupDescriptor(category, implementationName)
val loadedClass = javaClass.classLoader.loadClass(descriptor.className)
- val constructor = loadedClass.constructors
- .filter { it.parameterTypes.isEmpty() }
- .firstOrNull() ?: throw ServiceLookupException("Class ${descriptor.className} has no corresponding constructor")
+ val constructor = loadedClass.constructors.firstOrNull { it.parameterTypes.isEmpty() } ?: throw ServiceLookupException("Class ${descriptor.className} has no corresponding constructor")
val implementationRawType: Any = if (constructor.parameterTypes.isEmpty()) constructor.newInstance() else constructor.newInstance(constructor)
diff --git a/core/src/main/kotlin/javadoc/docbase.kt b/core/src/main/kotlin/javadoc/docbase.kt
index 2a14c6ff..f33b1324 100644
--- a/core/src/main/kotlin/javadoc/docbase.kt
+++ b/core/src/main/kotlin/javadoc/docbase.kt
@@ -326,8 +326,9 @@ open class ExecutableMemberAdapter(module: ModuleNodeAdapter, node: Documentatio
override fun thrownExceptionTypes(): Array<out Type> = emptyArray()
override fun receiverType(): Type? = receiverNode()?.let { receiver -> TypeAdapter(module, receiver) }
- override fun flatSignature(): String = node.details(NodeKind.Parameter).map { JavaLanguageService().renderType(it) }.joinToString(", ", "(", ")")
- override fun signature(): String = node.details(NodeKind.Parameter).map { JavaLanguageService().renderType(it) }.joinToString(", ", "(", ")") // TODO it should be FQ types
+ override fun flatSignature(): String = node.details(NodeKind.Parameter).joinToString(", ", "(", ")") { JavaLanguageService().renderType(it) }
+ override fun signature(): String =
+ node.details(NodeKind.Parameter).joinToString(", ", "(", ")") { JavaLanguageService().renderType(it) } // TODO it should be FQ types
override fun parameters(): Array<out Parameter> =
((receiverNode()?.let { receiver -> listOf<Parameter>(ReceiverParameterAdapter(module, receiver, this)) } ?: emptyList())
@@ -469,10 +470,8 @@ open class ClassDocumentationNodeAdapter(module: ModuleNodeAdapter, val classNod
}
fun DocumentationNode.lookupSuperClasses(module: ModuleNodeAdapter) =
- details(NodeKind.Supertype)
- .map { it.links.firstOrNull() }
- .map { module.allTypes[it?.qualifiedName()] }
- .filterNotNull()
+ details(NodeKind.Supertype)
+ .map { it.links.firstOrNull() }.mapNotNull { module.allTypes[it?.qualifiedName()] }
fun List<DocumentationNode>.collectAllTypesRecursively(): Map<String, DocumentationNode> {
val result = hashMapOf<String, DocumentationNode>()
diff --git a/core/src/test/kotlin/TestAPI.kt b/core/src/test/kotlin/TestAPI.kt
index aa3eff48..fa108b99 100644
--- a/core/src/test/kotlin/TestAPI.kt
+++ b/core/src/test/kotlin/TestAPI.kt
@@ -6,7 +6,6 @@ import com.intellij.openapi.util.Disposer
import com.intellij.openapi.util.io.FileUtil
import com.intellij.rt.execution.junit.FileComparisonFailure
import org.jetbrains.dokka.*
-import org.jetbrains.dokka.DokkaConfiguration.SourceLinkDefinition
import org.jetbrains.dokka.Utilities.DokkaAnalysisModule
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
diff --git a/core/src/test/kotlin/format/HtmlFormatTest.kt b/core/src/test/kotlin/format/HtmlFormatTest.kt
index 54c367fd..fd851414 100644
--- a/core/src/test/kotlin/format/HtmlFormatTest.kt
+++ b/core/src/test/kotlin/format/HtmlFormatTest.kt
@@ -3,7 +3,6 @@ package org.jetbrains.dokka.tests
import org.jetbrains.dokka.*
import org.jetbrains.kotlin.cli.jvm.config.JavaSourceRoot
import org.jetbrains.kotlin.config.KotlinSourceRoot
-import org.junit.Before
import org.junit.Test
import java.io.File
diff --git a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
index b971b54d..53c83de4 100644
--- a/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
+++ b/core/src/test/kotlin/format/KotlinWebSiteFormatTest.kt
@@ -1,7 +1,6 @@
package org.jetbrains.dokka.tests
import org.jetbrains.dokka.*
-import org.junit.Before
import org.junit.Ignore
import org.junit.Test
diff --git a/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt
index 49fa6d2f..8643d3e5 100644
--- a/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt
+++ b/core/src/test/kotlin/format/KotlinWebSiteHtmlFormatTest.kt
@@ -1,7 +1,6 @@
package org.jetbrains.dokka.tests
import org.jetbrains.dokka.*
-import org.junit.Before
import org.junit.Test
class KotlinWebSiteHtmlFormatTest: FileGeneratorTestCase() {
diff --git a/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt b/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt
index 453b1de8..00630e00 100644
--- a/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt
+++ b/core/src/test/kotlin/format/KotlinWebSiteRunnableSamplesFormatTest.kt
@@ -1,10 +1,6 @@
package org.jetbrains.dokka.tests
-import org.jetbrains.dokka.DokkaConsoleLogger
-import org.jetbrains.dokka.KotlinLanguageService
-import org.jetbrains.dokka.KotlinWebsiteRunnableSamplesFormatService
import org.junit.Ignore
-import org.junit.Test
@Ignore
class KotlinWebSiteRunnableSamplesFormatTest {
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt
index 9e4c831d..e213315b 100644
--- a/core/src/test/kotlin/format/MarkdownFormatTest.kt
+++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt
@@ -1,7 +1,6 @@
package org.jetbrains.dokka.tests
import org.jetbrains.dokka.*
-import org.junit.Before
import org.junit.Test
class MarkdownFormatTest: FileGeneratorTestCase() {
diff --git a/core/src/test/kotlin/issues/IssuesTest.kt b/core/src/test/kotlin/issues/IssuesTest.kt
index 625d7e46..e8cb4d9c 100644
--- a/core/src/test/kotlin/issues/IssuesTest.kt
+++ b/core/src/test/kotlin/issues/IssuesTest.kt
@@ -2,7 +2,6 @@ package issues
import org.jetbrains.dokka.DocumentationNode
import org.jetbrains.dokka.NodeKind
-import org.jetbrains.dokka.tests.toTestString
import org.jetbrains.dokka.tests.verifyModel
import org.junit.Test
import kotlin.test.assertEquals
diff --git a/core/src/test/kotlin/javadoc/JavadocTest.kt b/core/src/test/kotlin/javadoc/JavadocTest.kt
index 45c45aa4..aaeb7d00 100644
--- a/core/src/test/kotlin/javadoc/JavadocTest.kt
+++ b/core/src/test/kotlin/javadoc/JavadocTest.kt
@@ -120,8 +120,9 @@ class JavadocTest {
.find { it.name() == "some" }!!.parameters().first()
.type()
assertEquals("kotlin.jvm.functions.Function1", methodParamType.qualifiedTypeName())
- assertEquals("? super A, C", methodParamType.asParameterizedType().typeArguments()
- .map(Type::qualifiedTypeName).joinToString())
+ assertEquals("? super A, C",
+ methodParamType.asParameterizedType().typeArguments().joinToString(transform = Type::qualifiedTypeName)
+ )
}
}
diff --git a/core/src/test/kotlin/model/FunctionTest.kt b/core/src/test/kotlin/model/FunctionTest.kt
index 32910682..8a3f69d8 100644
--- a/core/src/test/kotlin/model/FunctionTest.kt
+++ b/core/src/test/kotlin/model/FunctionTest.kt
@@ -5,7 +5,6 @@ import org.jetbrains.dokka.NodeKind
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
-import kotlin.test.assertNotNull
class FunctionTest {
@Test fun function() {
diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt
index 06753342..d6ed610a 100644
--- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt
+++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaAndroidGradleTest.kt
@@ -31,7 +31,7 @@ abstract class AbstractDokkaAndroidGradleTest : AbstractDokkaGradleTest() {
acceptedLicenses.listFiles().forEach { licenseFile ->
val target = sdkLicensesDir.resolve(licenseFile.name)
if(!target.exists() || target.readText() != licenseFile.readText()) {
- val overwrite = System.getProperty("android.licenses.overwrite", "false").toBoolean()
+ val overwrite = System.getProperty("android.licenses.overwrite", "false")!!.toBoolean()
if (!target.exists() || overwrite) {
licenseFile.copyTo(target, true)
println("Accepted ${licenseFile.name}, by copying $licenseFile to $target")
diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt
index 255138a9..6bd5786f 100644
--- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt
+++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt
@@ -7,15 +7,16 @@ import org.junit.Rule
import org.junit.rules.TemporaryFolder
import java.io.File
import java.nio.file.Files
+import java.nio.file.Path
import java.nio.file.Paths
-val testDataFolder = Paths.get("testData")
+val testDataFolder: Path = Paths.get("testData")
-val pluginClasspathData = Paths.get("build", "createClasspathManifest", "dokka-plugin-classpath.txt")
-val androidPluginClasspathData = pluginClasspathData.resolveSibling("android-dokka-plugin-classpath.txt")
+val pluginClasspathData: Path = Paths.get("build", "createClasspathManifest", "dokka-plugin-classpath.txt")
+val androidPluginClasspathData: Path = pluginClasspathData.resolveSibling("android-dokka-plugin-classpath.txt")
-val dokkaFatJarPathData = pluginClasspathData.resolveSibling("fatjar.txt")
+val dokkaFatJarPathData: Path = pluginClasspathData.resolveSibling("fatjar.txt")
val androidLocalProperties = testDataFolder.resolve("android.local.properties").let { if (Files.exists(it)) it else null }
diff --git a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt
index 2a4ce712..9bc52273 100644
--- a/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt
+++ b/runners/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AndroidLibDependsOnJavaLibTest.kt
@@ -2,8 +2,6 @@ package org.jetbrains.dokka.gradle
import org.gradle.testkit.runner.TaskOutcome
import org.junit.Test
-import java.nio.file.Path
-import java.nio.file.Paths
import kotlin.test.assertEquals
class AndroidLibDependsOnJavaLibTest: AbstractDokkaAndroidGradleTest() {
diff --git a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
index 09da90c6..0a5d63e0 100644
--- a/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
+++ b/runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
@@ -235,11 +235,11 @@ class DokkaJavadocJarMojo : AbstractDokkaMojo() {
val javadocJar = File(jarOutputDirectory, jarFileName)
val archiver = MavenArchiver()
- archiver.setArchiver(jarArchiver)
+ archiver.archiver = jarArchiver
archiver.setOutputFile(javadocJar)
archiver.archiver.addDirectory(File(outputDir), arrayOf("**/**"), arrayOf())
- archive.setAddMavenDescriptor(false)
+ archive.isAddMavenDescriptor = false
archiver.createArchive(session, project, archive)
return javadocJar