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 PMEdoardo Luppi
03/24/2024, 7:27 PMLukas K-G
04/04/2024, 8:56 AM[Foo][com.fully.qualified.name.Foo]
into the corresponding html link in an arbitrary markdown file?Niklas
04/06/2024, 7:35 AM@X
. I already adopted the plugin tutorial to suppress all Functions that are annotated with @X
. https://kotlin.github.io/dokka/1.8.0-SNAPSHOT/developer_guide/plugin-development/sample-plugin-tutorial/
However, I really don't know how to go on from here. I need the place where I can say "If the function has annotation @X
, then add image x.png to it's page." I already found out that the html generatation is done in the dokka base-plugin, so should I extend this one? But this seems a bit complicated. Or is there some extension point I should use for this? I think renderer
could be correct, but I think at this point of time I don't have access to the annotation of the functions anymore, right? https://kotlin.github.io/dokka/1.8.0-SNAPSHOT/developer_guide/architecture/extension_points/core_extensions/
I'd appreciate your help :)Bohdan Novosad
04/18/2024, 9:08 PMHyeontae Jo
04/22/2024, 12:43 AMDefaultPageCreator
is still an open class, and can still be extended. It appears that external developers can't use the internal class. Is extending in this manner still a viable approach? It seems that this might not be the intended extension method for Dokka anymore. If there's something I'm missing, I’d appreciate any insights. Thanks!Garrett Schafer
04/22/2024, 9:11 PMdokkaHtmlMultiModule.configure
in my root build.gradle.kts
file but in all modules, nothing changes. I've tried adding the dokkaHtml.configure
to those modules as well with the same configuration and nothing seems to change. Am I missing something here?hfhbd
04/24/2024, 7:52 AMKtorDsl
, declared here https://github.com/ktorio/ktor/blob/5f27f303bd26a361430b45fe173434d35986f52a/ktor-io/common/src/io/ktor/utils/io/Annotations.kt#L80 but its not visible in the documentation: https://api.ktor.io/ktor-client/ktor-client-plugins/ktor-client-auth/io.ktor.client.plugins.auth/-auth-config/index.html