Как правильно настроить Orchid с kotlin для генерации красивой документации? - PullRequest
0 голосов
/ 24 октября 2019

У меня есть проект Android, написанный на Kotlin. Я установил kotlin / dokka, но html / javadoc, сгенерированный dokka, - это не тот результат, который я ищу. Поэтому я использовал орхидею, так как она имеет интеграцию с kotlin, и вот результат:


Executing tasks: [orchidServe] in project C:\dev\GtEasyClock\docs

> Task :docs:compileJava NO-SOURCE
> Task :docs:processResources NO-SOURCE
> Task :docs:classes UP-TO-DATE
> Task :docs:compileOrchidJava NO-SOURCE
> Task :docs:processOrchidResources NO-SOURCE
> Task :docs:orchidClasses UP-TO-DATE

> Task :docs:orchidServe
Using the following modules: 
--------------------
 * com.eden.orchid.StandardModule

Auto-loaded modules: 
--------------------
 * com.eden.orchid.changelog.ChangelogModule
 * com.eden.orchid.editorial.EditorialModule
 * com.eden.orchid.forms.FormsModule
 * com.eden.orchid.impl.compilers.markdown.FlexmarkModule
 * com.eden.orchid.impl.compilers.pebble.PebbleModule
 * com.eden.orchid.kotlindoc.KotlindocModule
 * com.eden.orchid.languages.diagrams.DiagramsModule
 * com.eden.orchid.languages.highlighter.SyntaxHighlighterModule
 * com.eden.orchid.pages.PagesModule
 * com.eden.orchid.plugindocs.PluginDocsModule
 * com.eden.orchid.search.SearchModule
 * com.eden.orchid.wiki.WikiModule

Flag values: 
--------------------
-adminTheme: Default
-baseUrl: http://username.github.io/project
-defaultTemplateExtension: peb
-dest: C:\dev\GtEasyClock\docs\build\docs\orchid
-dryDeploy: false
-environment: debug
-logLevel: VERBOSE
-port: 8080
-src: C:\dev\GtEasyClock\docs\src\orchid\resources
-task: serve
-theme: Editorial
-version: 1.0.0

[INFO] Orchid: Running Orchid version 0.17.6, site version 1.0.0 in debug environment
[INFO] OrchidWebserver: Webserver Running at http://localhost:8080
[INFO] OrchidWebsocket: Websocket running at http://localhost:8081/
[INFO] TaskServiceImpl: Build Starting...
[INFO] GeneratorServiceImpl: Indexing [10000: assets]
[INFO] GeneratorServiceImpl: Indexing [1000: home]
[INFO] GeneratorServiceImpl: Indexing [1000: kotlindoc]
[INFO] GeneratorServiceImpl: Indexing [1000: pages]
[INFO] GeneratorServiceImpl: Indexing [1000: wiki]
[INFO] GeneratorServiceImpl: Indexing [100: changelog]
[INFO] GeneratorServiceImpl: Indexing [100: forms]
java.lang.IllegalStateException: Error loading jar file.
    at com.eden.orchid.api.resources.resourcesource.JarResourceSource.jarForClass(JarResourceSource.kt:52)
    at com.eden.orchid.api.resources.resourcesource.JarResourceSource.getResourceEntries(JarResourceSource.kt:87)
    at com.eden.orchid.api.resources.ResourceServiceImpl.lambda$addEntries$7(ResourceServiceImpl.java:216)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    at com.eden.orchid.api.resources.ResourceServiceImpl.addEntries(ResourceServiceImpl.java:216)
    at com.eden.orchid.api.resources.ResourceServiceImpl.getResourceEntries(ResourceServiceImpl.java:209)
    at com.eden.orchid.api.resources.ResourceService.getResourceEntries(ResourceService.java:50)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
    at com.sun.proxy.$Proxy38.getResourceEntries(Unknown Source)
    at com.eden.orchid.forms.FormsGenerator.getFormsByDatafiles(FormsGenerator.kt:48)
[ERROR] Errors:
    at com.eden.orchid.forms.FormsGenerator.startIndexing(FormsGenerator.kt:36)
    at com.eden.orchid.api.generators.GeneratorServiceImpl.indexGenerator(GeneratorServiceImpl.java:101)
    at java.util.TreeMap$KeySpliterator.forEachRemaining(TreeMap.java:2746)
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
    at com.eden.orchid.api.generators.GeneratorServiceImpl.buildInternalIndex(GeneratorServiceImpl.java:87)
    at com.eden.orchid.api.generators.GeneratorServiceImpl.startIndexing(GeneratorServiceImpl.java:80)
    at com.eden.orchid.api.generators.GeneratorService.startIndexing(GeneratorService.java:16)
    at com.eden.orchid.api.tasks.TaskServiceImpl.build(TaskServiceImpl.java:134)
    at com.eden.orchid.api.tasks.TaskService.build(TaskService.java:30)
    at com.eden.orchid.impl.tasks.ServeTask.run(ServeTask.kt:23)
[ERROR] Orchid: 
    at com.eden.orchid.api.tasks.TaskServiceImpl.runTask(TaskServiceImpl.java:83)
[ERROR]     - Something went wrong running Orchid
    at com.eden.orchid.api.tasks.TaskServiceImpl.onPostStart(TaskServiceImpl.java:74)

    at java.util.HashMap$Values.forEach(HashMap.java:981)

    at com.eden.orchid.api.OrchidContextImpl.start(OrchidContextImpl.java:74)
    at com.eden.orchid.Orchid.start(Orchid.java:110)
    at com.eden.orchid.Orchid.start(Orchid.java:77)
    at com.eden.orchid.Orchid.internalMain(Orchid.java:69)
    at com.eden.orchid.Orchid.main(Orchid.java:60)
Caused by: java.io.FileNotFoundException: C:\Users\Nick%20Iascerinschi\.gradle\caches\modules-2\files-2.1\io.github.javaeden.orchid\OrchidEditorial\0.17.6\b9e43cdd306e505aace8b86da317567a369d489e\OrchidEditorial-0.17.6.jar (The system cannot find the path specified)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:225)
    at java.util.zip.ZipFile.<init>(ZipFile.java:155)
    at java.util.jar.JarFile.<init>(JarFile.java:166)
    at java.util.jar.JarFile.<init>(JarFile.java:103)
    at com.eden.orchid.api.resources.resourcesource.JarResourceSource.jarForClass(JarResourceSource.kt:49)
    ... 39 more

> Task :docs:orchidServe FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':docs:orchidServe'.
> Process 'command 'C:\Program Files\Android\Android Studio\jre\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 8s
1 actionable task: 1 executed
4:50:52 PM: Task execution finished 'orchidServe'.

Итак, я делаю что-то не так, следуя этому уроку: https://orchid.netlify.com/wiki/learn/tutorials/how-to-document-kotlin#orchid-setup

...