dokka | API documentation engine for Kotlin | Plugin library
kandi X-RAY | dokka Summary
kandi X-RAY | dokka Summary
Dokka is a documentation engine for Kotlin, performing the same function as javadoc for Java. Just like Kotlin itself, Dokka fully supports mixed-language Java/Kotlin projects. It understands standard Javadoc comments in Java files and KDoc comments in Kotlin files, and can generate documentation in multiple formats including standard Javadoc, HTML and Markdown.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of dokka
dokka Key Features
dokka Examples and Code Snippets
Community Discussions
Trending Discussions on dokka
QUESTION
I am new to kotlin, so I am sorry in advance, if this is a simple misstake.
I am trying at the moment to rewrite an api (written in Kotlin) to java 17. Everything worked so far. But now I am getting following deprecated message:
'toLowerCase(): String' is deprecated. Use lowercase() instead.
Of course I know what it means, so I tried doing it like in the following Picture: https://i.stack.imgur.com/vT8k5.png
But why doesnt it find the lowercase Function?
This is in my build.gradle:
...ANSWER
Answered 2022-Jan-29 at 18:58Ensure your kotlin-stdlib
version is 1.5 or above. Check this out
QUESTION
When I import my library from maven there's no available documentation on Android Studio/IntelliSense. Even if I set up Dokka properly and javadoc.jar is present on the maven repo, still can't get it to work. This is the gradle script:
...ANSWER
Answered 2021-Dec-07 at 09:53Solved the issue, all the setup was fine, but I made the mistake of copying the documentation from an original java file with javadoc to a kotlin file with Kdoc and basically, Dokka was failing to parse Kdoc to Javadoc ended up invalid and Android studio couldn't download sources. Build never failed and I had no issues on my CircleCI build hence why was harder for me to find the origin of this problem!
Double-check your documentation to make sure Dokka can convert it properly!
QUESTION
I am trying to implement CodeCov/Jacoco as described here:
This guide works really well for the main app module, specified with 'com.android.application in the app-level build.gradle.
However, I have a second library module called video_library that is specified as a library with 'com.android.library' on its build.gradle.
Whenever I try and run the Jacoco tasks for the video_library module, the tasks run but it fails to run any of the unit tests I have written, as if it cannot find any tests (although there are over 50 for this module)
The project structure is as follows:
...ANSWER
Answered 2021-Sep-23 at 10:12You need to include to classDirectories
library_video
classes manually in :app
module. This is at least what help me to achieve multi-module code coverage.
In the :app
module (I am using Gradle KTS, hence in Kotlin):
QUESTION
I'm tried to annotate like @property but it is not right. Dokka does not recognise it
For example enum:
...ANSWER
Answered 2021-Aug-24 at 10:58You can take a look at the Kotlin documentation about how to put doc comments in the code.
You can place documentation wherever the thing you want to document is.
QUESTION
I just create a new android project with Android Studio(AS). I add a library module
with a vector drawable and a Kotlin file with comments.
I run assemble release and it generates an aar
file.
I open this aar release file with AS decompiler and I see the vector file is converted to png for different drawables and the Kotlin file is obfuscated saying compiled code
.
The original xml vector file can be found only in directory drawable-anydpi-v24
How can I disable vector to png
and file obfuscation
for my library module?
I have default build.gradle: minifyEnabled false
(I am already aware of org.jetbrains.dokka
so please don't say just use it)
ANSWER
Answered 2021-Mar-24 at 11:56Thanks to @Gustavo comment in my question I started investigating even more regarding the issue with generated png files.
I have the min sdk 21, I tried also 22 and it had the same result.
Then after some playing with vectors I find out that what caused my issue was the property android:fillType="evenOdd"
I tested with this property and without it and I had these 2 results:
Source xml:
QUESTION
I am trying to publish my Kotlin multiplatform library to Maven Central via Sonatype. This repository requires me to include a javadoc.jar
file with my artifacts. Unfortunately, the IntelliJ IDEA project wizard and the Kotlin multiplatform docs do not help me do that. When running the Gradle task dokkaJavadoc
(for the official Kotlin documentation tool Dokka), I get the error "Dokka Javadoc plugin currently does not support generating documentation for multiplatform project."
I actually do not need genuine JavaDocs for publishing - an empty javadoc.jar
or one with other docs generated by Dokka would suffice. Since I have been a longtime Maven user and these are my first steps with Gradle, I have no idea how to do that.
build.gradle.kts
:
ANSWER
Answered 2021-Mar-19 at 20:10This answer is a cross-post from Kotlin Discussions. Credit goes to Lamba92_v2 of the JetBrains Team, who linked his solution in his project kotlingram.
I noticed I had another issue related to publishing: Signatures and POM information where not applied to all modules. But given Lamba92_v2's code I could resolve all publishing-related issues:
QUESTION
I'm trying to simplify some of my Gradle builds. A typical build.gradle.kts
looks like
ANSWER
Answered 2021-Mar-03 at 22:40Looks like you're creating an extension function on KotlinBuildScript
which may or may not be the issue. Regardless, there's no need for extension functions since you can just use the DSL directly.
Gradle calls the shared build logic convention plugins: https://docs.gradle.org/current/samples/sample_convention_plugins.html#compiling_convention_plugins
So your Example.kt
would become kotlin-conventions.gradle.kts
:
QUESTION
As Jcenter will be shutdown soon I’m trying to migrate my libs to Maven Central. I have searched a lot to find any working script but with no luck. There is official docs, but it is like a joke, there just told to put maven-publish
plugin to the gradle script and voila that’s it.
Currently I'm getting error:
...ANSWER
Answered 2021-Feb-24 at 14:30It seems the issue was in this line artifact(tasks["sourcesJar"])
as this task already included.
Here I want to put my working script for uploading kotlin multiplatform library to Maven Central.
First of all we need to register Sonatype account, validate our domain, etc, here is a fresh article with detailed steps.
Then your project script build.gradle.kts
may look like this:
QUESTION
I generated documentation with Dokka for a View subclass. Works well, but the docs include the hundreds of public functions of the base View class. Is there a way to only document my subclass public functions?
I tried adding these options to the Gradle task but I don't think this is what it was meant for:
...ANSWER
Answered 2020-Sep-22 at 12:29Currently, there is no option to that, we plan to add dedicated flag to turn it on/off.
You can follow this issue to get current state on that case: https://github.com/Kotlin/dokka/issues/1501
QUESTION
I am generating documentation using KDoc/Dokka for an android library.
I have a custom view, which extends LinearLayout
.
The problem is that LinearLayout
contains hundreds of public methods. Dokka generates empty documentation for all of these methods, even though I did not use or override them in my own code.
This completely buries any of my own methods and makes the documentation near useless.
How can I prevent dokka from generating documentation for inherited methods?
...ANSWER
Answered 2020-Sep-22 at 12:26Currently this is not supported, probably we will add some flag to turn it on/off.
You can follow this issue: https://github.com/Kotlin/dokka/issues/1501
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install dokka
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page