dokka
dokka copied to clipboard
Print the path to the HTML files after generation
Is your feature request related to a problem? Please describe
When I run ./gradlew dokkaHtmlMultiModule, I often want to open the files in a browser. Currently, I have to run <browser> build/dokka/htmlMultiModule/index.html, which is inconvenient and unfriendly for newcomers to the project.
Describe the solution you'd like
When Dokka is done building the project, it prints a file:// path to the generated index.html file. Smart displays (the IDEA's console, emulators like KDE's Konsole) automatically replace it by an hyperlink that the user can click to open the file in their browser.
Describe alternatives you've considered
I guess it could be possible to open the file in the browser directly or introduce a task dokkaOpenBrowser but that seems like more trouble than it's worth, especially when paths in file:// seem well supported.
Additional context This seems to be a common solution to this problem.
For example, the integrated test task in Gradle:
* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/[REDACTED]/build/reports/tests/jvmTest/index.html
As another example, JetBrains' Kover:
> Task :koverMergedHtmlReport
Kover: merged HTML report file:///home/[REDACTED]/build/reports/kover/html/index.html
Are you willing to provide a PR? I'm not familiar with Gradle plugins nor with Dokka's codebase, but this seems like a trivial feature (it's just printing out the path that Dokka writes to). With an outline of where to look and what to change, I can provide a PR.