@BarkingBad Here is the result with your suggested input (using version 1.4.10):
> "C:\opt\jdk-1.8.0_262-b10\bin\java.exe" -jar "%LOCALAPPDATA%\Temp\lib\dokka-cli-1.4.10.jar" -pluginsClasspath "%USERPROFILE%\.m2\repository\org\jetbrains\kotlinx\kotlinx-coroutines-core\1.3.9\kotlinx-coroutines-core-1.3.9.jar;%LOCALAPPDATA%\Temp\lib\kotlinx-cli-jvm-0.3.jar;%LOCALAPPDATA%\Temp\lib\kotlinx-html-jvm-0.7.2.jar;%LOCALAPPDATA%\Temp\lib\kotlin-analysis-compiler-1.4.10.jar;%LOCALAPPDATA%\Temp\lib\dokka-analysis-1.4.10.jar;%LOCALAPPDATA%\Temp\lib\dokka-base-1.4.10.jar;%LOCALAPPDATA%\Temp\lib\dokka-core-1.4.10.jar;" -outputDir "K:\examples\Reflection\target\docs" -sourceSet "-moduleName Reflection -moduleVersion 0.1-SNAPSHOT -src K:\examples\Reflection\src\main\kotlin"
Exception in thread "main" java.lang.IllegalStateException: Value for argument moduleName isn't set. ArgParser.parse(...) method should be called before.
at kotlinx.cli.ArgumentSingleValue.getValue(ArgumentValues.kt:121)
at kotlinx.cli.CLIEntity.getValue(Arguments.kt:49)
at org.jetbrains.dokka.ArgTypeArgument.convert(main.kt:287)
at org.jetbrains.dokka.ArgTypeArgument.convert(main.kt:284)
at kotlinx.cli.ArgumentMultipleValues.saveValue(ArgumentValues.kt:163)
at kotlinx.cli.ParsingValue.addValue$kotlinx_cli(ArgumentValues.kt:69)
at kotlinx.cli.ArgParser.saveAsOption(ArgParser.kt:341)
at kotlinx.cli.ArgParser.parse(ArgParser.kt:469)
at kotlinx.cli.ArgParser.parse(ArgParser.kt:375)
at org.jetbrains.dokka.GlobalArguments.<init>(main.kt:90)
at org.jetbrains.dokka.MainKt.main(main.kt:336)
Any idea whatâs wrong with moduleName argument ?
The API has slightly changed between 1.4.0-rc and 1.4.10. Now, the moduleName argument is per configuration (not sourceSet, as it was leftover of dokka 0.10.0, which didnât make sense anymore). I guess itâs a bug that it has no default value. Nonetheless, you should move -moduleName <your_name_here> from -sourceSet to just top-level argument in a new version
Following your suggestion I moved both arguments -moduleName and -moduleVersion (must also be moved) to the top-level. I now get the following assertion error:
> "C:\opt\jdk-1.8.0_262-b10\bin\java.exe" -jar "%LOCALAPPDATA%\Temp\lib\dokka-cli-1.4.10.jar" -pluginsClasspath "%USERPROFILE%\.m2\repository\org\jetbrains\kotlinx\kotlinx-coroutines-core\1.3.9\kotlinx-coroutines-core-1.3.9.jar;%LOCALAPPDATA%\Temp\lib\kotlinx-cli-jvm-0.3.jar;%LOCALAPPDATA%\Temp\lib\kotlinx-html-jvm-0.7.2.jar;%LOCALAPPDATA%\Temp\lib\kotlin-analysis-compiler-1.4.10.jar;%LOCALAPPDATA%\Temp\lib\dokka-analysis-1.4.10.jar;%LOCALAPPDATA%\Temp\lib\dokka-base-1.4.10.jar;%LOCALAPPDATA%\Temp\lib\dokka-core-1.4.10.jar;" -moduleName Reflection -moduleVersion 0.1-SNAPSHOT -outputDir "K:\examples\Reflection\target\docs" -sourceSet "-src K:\examples\Reflection\src\main\kotlin"
WARN: Dokka 1.4.* is an alpha project
PROGRESS: Initializing plugins
PROGRESS:
Exception in thread "main" java.lang.AssertionError: Dokka API found on plugins classpath. This will lead to subtle bugs. Please fix your plugins dependencies or exclude dokka api artifact from plugin classpath
at org.jetbrains.dokka.plugability.DokkaContextKt.checkClasspath(DokkaContext.kt:216)
at org.jetbrains.dokka.plugability.DokkaContextKt.access$checkClasspath(DokkaContext.kt:1)
at org.jetbrains.dokka.plugability.DokkaContext$Companion.create(DokkaContext.kt:36)
at org.jetbrains.dokka.DokkaGenerator.initializePlugins(DokkaGenerator.kt:72)
at org.jetbrains.dokka.DokkaGenerator.initializePlugins$default(DokkaGenerator.kt:71)
at org.jetbrains.dokka.DokkaGenerator$generate$1.invoke(DokkaGenerator.kt:27)
at org.jetbrains.dokka.DokkaGenerator$generate$1.invoke(DokkaGenerator.kt:19)
at org.jetbrains.dokka.DokkaGeneratorKt.timed(DokkaGenerator.kt:165)
at org.jetbrains.dokka.DokkaGeneratorKt.access$timed(DokkaGenerator.kt:1)
at org.jetbrains.dokka.DokkaGenerator.generate(DokkaGenerator.kt:23)
at org.jetbrains.dokka.MainKt.main(main.kt:343)
Error: Generation of HTML documentation failed
Any idea which file path is superfluous/erronous in -pluginsClasspath ?
I believe itâs because of dokka-core. It should not be on pluginsâ classpath. If it doesnât fix the build, please file an issue at github Kotlin/dokka repository.
WARN: Dokka 1.4.* is an alpha project
PROGRESS: Initializing plugins
Loaded plugins: [org.jetbrains.dokka.base.DokkaBase]
Loaded: [
ExtensionPoint: org.jetbrains.dokka.CoreExtensions/allModulePageCreator,
ExtensionPoint: org.jetbrains.dokka.CoreExtensions/pageTransformer,
[ ... (removed) ... ]
Extension: org.jetbrains.dokka.base.DokkaBase/psiToDocumentableTranslator,
Extension: org.jetbrains.dokka.base.DokkaBase/descriptorToDocumentableTranslator
]
Suppressed: [
]
PROGRESS: Creating documentation models
PROGRESS: Transforming documentation model before merging
PROGRESS: Merging documentation models
PROGRESS: Transforming documentation model after merging
PROGRESS: Creating pages
PROGRESS: Transforming pages
PROGRESS: Rendering
Unused extension points found: ExtensionPoint: org.jetbrains.dokka.CoreExtensions/allModulePageCreator
Generation completed with 1 warning and 0 errors
PROGRESS:
=== TIME MEASUREMENT ===
Initializing plugins: 571
Creating documentation models: 2326
Transforming documentation model before merging: 0
Merging documentation models: 0
Transforming documentation model after merging: 63
Creating pages: 53
Transforming pages: 47
Rendering: 2036
PS. I still need to figure out why -language-features (directory with root file index.html) and -search.html start with a â-â character (maybe more arguments are required):
> dir /b target\docs
-language-features
-search.html
images
navigation.html
scripts
styles
Hey,
it seems you are missing kotlinx-html-jvm-0.7.2.jar on your classpath. Let me know if this fixes NoClassDefFoundError. For the overflow of pages and in result failing job with coroutines I believe there is something wrong with you configuration, could you send the repository hosted online on e. g. github to see the sourcecode? I have not been in this project for past 3 months, so if there are any further concerns, I will delegate this issue to my colleagues.
I have a related question about generating documentation for a muli-module project. Since -moduleName is a top-level argument, it appears that I can generate dokka files for only one module at a time. Is this correct? With javadoc I get an initial index.html page showing all modules â see below showing three modules. I can create such a page by hand if necessary for dokka, but it would be nice if a similar overview page were created automatically.
Currently dokka doesnât support javadoc multimodule projects, here is an issue if you are interested in tracking this feature.
Technically if you really need it you can run dokka on all modules separately and handcraft the main page to list all of them but you wont get any linking between the contents of those modules. It might be a better idea to submit a contribution to dokka, since people would be able to use it, if you have some spare time of course