testDokka.sh.md
March 26, 2026 ยท View on GitHub
Purpose
This is a helper script for Dokka development and testing. If it does not work for you, you can always do the same steps manually as described in CONTRIBUTING.md.
.testDokka.sh makes Dokka development and testing a bit faster
It compiles current Dokka version from the source code,
publishes it to the local Maven repository,
then runs the Dokka documentation generation against the specified project
and finally runs a webserver to open the generated documentation in the browser.
Usage
cd scripts and then
Without parameters
By default it applied to the ./examples/gradle/dokka-gradle-example project
./testDokka.sh
Specify test project path
./testDokka.sh -d ./examples/gradle/dokka-gradle-example
Specify Dokka version
./testDokka.sh -v 2.2.0-my-fix-SNAPSHOT
Specify port
./testDokka.sh -p 8001
All together
./testDokka.sh -d ./examples/gradle/dokka-gradle-example -v 2.2.0-my-fix-SNAPSHOT -p 8001
Apply to a multi-module project
./testDokka.sh -m
Requirements
To run the server you need to have Python 3 installed.
Troubleshooting
-
Make sure thar the path to the test project specified relative to the root of the Dokka project
-
If occurs
Could not resolve all files for configuration ':dokkaHtmlPlugin'error,- then make sure that
mavenLocal()is added to therepositoriessection of thebuild.gradlefile of the project you are testing against. It is not automated and should be done manually.
- then make sure that
-
if occurs
Failed to write org.jetbrains.dokka.base.renderers.FileWriter@628cef4a. Parent job is Cancelling- then try to change the dokka version specified by
-vparameter (e.g.-v 2.2.0-my-fix1-SNAPSHOT)
- then try to change the dokka version specified by