Adham
11/30/2023, 11:47 AMtasks.withType(DokkaTask.class).configureEach {
dokkaSourceSets {
named("main") {
moduleName.set("mkplayer")
moduleVersion.set("$mkplayer_version")
includes.from("../docsDokka/src/mkplayersdk.md")
outputDirectory.set(file("../docsDokka/src/tempOutput/html"))
}
}
String dokkaBaseConfiguration = """
{
"footerMessage": "(c) Player SDK for Android. All rights reserved."
}
"""
pluginsMapConfiguration.set(
["org.jetbrains.dokka.base.DokkaBase": dokkaBaseConfiguration]
)
}
Installation
• Operating system: macOS
• Build tool: Gradle v8.3.0
• Dokka version: 1.9.10
Screenshots
when moduleName is same, data from 'playersdk.md' is shown
moduleName.set("mkplayer")
when moduleName is different, data from 'playersdk.md' is not shown
moduleName.set("Player SDK for Android")Ingo
12/08/2023, 11:08 AM###
path prefixes staying in the final Dokka HTML output.Jey
12/13/2023, 3:50 PMsrc/main/java
and move the delombaked version of package in a separate folder build/src-delombak
. i need to generate a doc for that source presented in the new folder. when i changed the sourceRoots its always generating docs from root folder ``src/main/java``
Example:
root build.gradle - https://github.com/ForgeRock/forgerock-android-sdk/blob/develop/build.gradle
plugins {
id("org.jetbrains.dokka") version "1.9.10"
}
submodule library build.gradle - https://github.com/ForgeRock/forgerock-android-sdk/blob/develop/config/kdoc.gradle#L65
apply plugin: "org.jetbrains.dokka"
dokkaHtml.dependsOn delombok
dokkaHtml {
dokkaSourceSets {
named("main") {
outputDirectory = file("build/html/$project.name-dokka")
sourceDirs = files("$buildDir/src-delomboked") // not works
sourceRoots.setFrom(file("$buildDir/src-delomboked")) // not works
}
}
}
./gradle dokkaHtml (this will delombak first and will create a doc)
How do i fix this issue by pointing to the source presented in different folder ?Anouar di Kali
01/02/2024, 11:33 AMgradlew dokkaHTMLMultiModule
, the private methods are not being included.
Here is the Dokka configuration in the build.gradle.kts
file:
tasks.dokkaHtmlMultiModule.configure {
outputDirectory.set(layout.buildDirectory.dir("DokkaMoltiModuleDoc"))
}
tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
dokkaSourceSets {
configureEach {
includeNonPublic.set(true)
skipEmptyPackages.set(true)
}
}
}
mbonnin
01/07/2024, 10:45 PMdokka/html/older
meaning the amount of data needed to build n versions grows like n*(n-1)/2 (I think, maths are hard!)
Would it make sense to only provide version n-1?Oleg Yukhnevich
01/08/2024, 8:01 PMWesley Hartford
01/11/2024, 6:31 PMdokkaHtmlMultiModule
task, but the platform project does not show up in the resulting documentation. What I'd like to see is simply the project's Module.md
file rendered into the docs as it is for other projects.Wesley Hartford
01/11/2024, 11:27 PMWesley Hartford
01/12/2024, 6:29 PMModule.md
to a symbol in module B (such as a class or function), A must depend on B in order for the link to be resolved. Is there a specific dependency configuration that can be used when there is no other need for that dependency? I've got the link working by adding an otherwise unnecessary compileOnly
dependency, but I'd rather not keep that.
(Sorry for dominating this channel lately, it's my first time trying to get everything just right in my API docs).mkrussel
01/17/2024, 1:15 PMkenkyee
01/22/2024, 4:52 PMJane Lee
01/23/2024, 12:07 AMOleg Yukhnevich
01/29/2024, 2:38 PMEdoardo Luppi
01/30/2024, 8:23 PMFederico Tomassetti
01/31/2024, 3:10 PMprivate fun buildAST(file: File): AST {
val sourceSet =
DokkaSourceSetImpl(
displayName = "ast",
sourceSetID = DokkaSourceSetID("ast", "ast"),
sourceRoots = setOf(file.canonicalFile),
)
val dokkaContext =
DokkaContext.create(
DokkaConfigurationImpl(sourceSets = listOf(sourceSet)),
DokkaConsoleLogger(),
listOf(),
)
// here there is my beloved and removed API
val translator = DefaultDescriptorToDocumentableTranslator(dokkaContext)
val module = translator.invoke(sourceSet, dokkaContext)
return AST(module, sourceSet)
}
I then use the output of the previous method to populate my map:
private fun recordDocumentation(ast: AST) {
ast.module.packages.forEach { pkg ->
val documentationNode = pkg.documentation[ast.sourceSet]
documentationNode?.let { commentsByFqn[pkg.packageName] = it }
pkg.classlikes.forEach { cls ->
val classDoc = cls.documentation[ast.sourceSet]
val name = cls.name
classDoc?.let {
name?.let { commentsByFqn[pkg.packageName + "." + name] = classDoc }
}
name?.let {
cls.properties.forEach { property ->
val propertyDoc = property.documentation[ast.sourceSet]
propertyDoc?.let {
commentsByFqn[keyForProperty(pkg.packageName, name, property.name)] = propertyDoc
}
}
}
}
}
}
Do you have any idea of how I could achieve the same result without the analysis APIs?Jeff Lockhart
02/02/2024, 3:30 AMRobert Jaros
02/11/2024, 11:11 AMCLOVIS
02/15/2024, 5:24 PMe: file:///…/src/commonMain/kotlin/Parameters.kt:46:31 Unresolved reference: HashMap
e: file:///…/src/commonMain/kotlin/Parameters.kt:120:3 Unresolved reference: JvmInline
e: file:///…/commonMain/kotlin/Parameters.kt:141:4 Unresolved reference: require
e: file:///…/src/commonMain/kotlin/Parameters.kt:141:17 Unresolved reference: isNotBlank
Does anyone know what this could be caused by?KV
02/19/2024, 11:55 AMIs this possible to add multiple md files via dokka configurations?
For example in this repo: https://github.com/Kotlin/dokka/blob/1.9.10/examples/gradle/dokka-gradle-example/build.gradle.kts
We have only Module.md
file. So in the gradle, we have added below line:
moduleName.set("Dokka Gradle Example")
includes.from("Module.md")
But what if we have one more Module1.md file to show the different content?
I tried below code it works actually, I can see content of the 2 different md files
includes.from("Module.md", "Module.md")
but is there any way where we can have these 2 file separates?
Can someone have face this kind of issues before to show multiple md files in the project?Joar
02/20/2024, 4:18 PMSourceToDocumentableTranslator
to convert our `.rell`files (which I compile in the in the invoke
method to get the type info). This worked fairly alright, except for some exceptions that the DocumentableToPageTranslator
could not handle my custom DeclarationDescriptor
, so I extended that too.
This was actually pretty cool! 🎉
Now there are some fundamental differences between Kotlin and Rell, so I also need to customize the theme and naming etc. Now this is where it started to get a bit more of a hassle. I created my own extensoin of DefaultPageCreator
in the hopes of achieving this.
Unfortunately, changing the title from "Package-level declarations" to "Module-level declarations" required a a full override of contentForPackage
(with a one line change), and similarly for changing the main title from "Packages" to "Modules" required overriding contentForModule
. I was hoping there was a quicker way to change these small details.
The real headache came when I wanted to add more tabs (In rell, function-like types are "operations", "queries" and "functions"). Seems like this is handled by the HtmlRenderer#createTabsForPackage
which unfortunately is private. Following the call chain there are a number of private functions before coming to the open ones. Would it be possible to make this a bit more configurable (make more functions open and protected)?
Do you have any suggestions on what my best way forward is? Should I just copy all classes and rewrite them? Can we make the framework more configurable/customizable?kenkyee
02/22/2024, 11:24 PMEdoardo Luppi
02/25/2024, 12:22 PMIgnat Beresnev
03/04/2024, 6:00 PMsnowe
03/05/2024, 7:15 PM<!--[+]cmd:{"@class":"org.jetbrains.dokka.base.templating.PathToRootSubstitutionCommand","pattern":"###","default":""}-->
What I did to get to this point:
At the root I ran ./gradle install
Then in libraries/tools/kotlin-stdlib-docs
I ran ./gradlew kotlin-stdlib_2.0_latest
and ./gradlew kotlin-reflect_2.0_latest
, which generated the docs to the kotlin-stdlib-docs/build/doc/partial/latest
directory. I noted that this is a ‘partial’ so I tried using ./gradlew dokkaHtmlCollector
both from the root of the kotlin repo and also from the kotlin-stdlib-docs
folder, both of which failed with errors.
I can’t find any documentation in the repo about how this is generated, nor can I find any references to this module at all, even though it is clearly what is building the docs… I’ve also tried building the kotlin-web-site repo, but that seems to only be the css and js and images, not the api docs.
Anyone know what I could be doing wrong here?KvRae
03/08/2024, 9:17 AMcom.share.components
to just the components
so anyone can help on how to achieve this please 😇Xuan
03/11/2024, 7:56 AMRuben Quadros
03/11/2024, 4:50 PMcom.ruben.api
and it has 2 files BrowseApi.kt
and BrowseApiImpl.kt
. I do not want to generate any documentation for the BrowseApiImpl.kt
file.
I have tried using suppressedFiles
but it did not work. Here is my configuration:
tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets {
named("commonMain") {
moduleName.set("ABC")
includes.from("api.md")
sourceRoots.from(file("src/commonMain"))
skipEmptyPackages.set(true)
documentedVisibilities.set(
setOf(DokkaConfiguration.Visibility.PUBLIC, DokkaConfiguration.Visibility.INTERNAL)
)
suppressedFiles.from(
file("src/commonMain/browse/BrowseApiImpl.kt")
)
sourceLink {
localDirectory.set(file("src/commonMain/kotlin"))
remoteUrl.set(
URL("GITHUB URL")
)
remoteLineSuffix.set("#L")
}
}
}
}
kevin.cianfarini
03/11/2024, 9:53 PMFeatureFlagDataStore
should link me to the core artifact, but instead it tries to link me to the compose artifact and results in a 404. Is this potentially a bug in Dokka? I wasn't able to find anything relevant in the Github issues.Sergio
03/13/2024, 4:14 PMshared
Kirill Gagarski
03/15/2024, 6:27 PM