Closed guichazan closed 5 years ago
Orchid doesn't create the traditional Javadocs that you're used to, but rather hooks into it, gets its raw data, and makes its own website using that data. An example of what it might look like is Orchid's own code docs. Those ones are Kotlindocs, but the Javadocs will look nearly the same.
Orchid is easiest to use with Gradle, but you can use its CLI directly if you set it up using the kscript method outlined here. Then you can use the CLI to generate a website with Javadocs just the same as if building with Gradle, there's no difference between the two.
Hi,
I decided to use gradle. So i created a build.gradle with this:
plugins {
id "com.eden.orchidPlugin" version "0.16.1"
}
repositories {
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url 'https://jitpack.io' }
}
dependencies {
orchidRuntime 'io.github.javaeden.orchid:OrchidAll:0.16.1'
orchidRuntime 'io.github.javaeden.orchid:OrchidJavadoc:0.16.4'
}
orchid {
// The following properties are optional
version = "1.0.13"
baseUrl = "http://javadoc.ueeze.com" // a baseUrl prepended to all generated links. Defaults to '/'
srcDir = "javadoc" // defaults to 'src/orchid/resources'
destDir = "javadoc_orchid" // defaults to 'build/docs/orchid'
runTask = "build" // specify a task to run with 'gradle orchidRun'
}
When i run it with > gradlew orchidRun, i get:
-absDefaultVersion: eng-NASB -adminTheme: Default -baseUrl: http://javadoc.ueeze.com -defaultTemplateExtension: peb -dest: G:\ueeze\doc\javadoc_orchid -dryDeploy: false -environment: debug -githubToken: [HIDDEN] -logLevel: VERBOSE -port: 8080 -src: G:\ueeze\doc\javadoc -task: build -theme: Default -version: 1.0.13
...
Build Complete Generated 2 pages in 5s
But i have 750 pages under the javadoc folder
I also tried to add the OrchidEditorial, so i added: orchidRuntime 'io.github.javaeden.orchid:OrchidEditorial:0.16.1' and theme "OrchidEditorial"
then Orchid says that the theme "theme-OrchidEditorial" could not be found.
Thanks in advance
guich
Orchid's Javadoc generation is totally separate from Gradle's, and you'll need to tell Orchid the Java sources you want to be documented in your config.yml
file, which is separate from the srcDir
set in Gradle.
# config.yml
...
javadoc:
sourceDirs:
- '../../main/java' # a relative path from your `srcDir` to the directory containing Java file
For using the Editorial theme, the name is just Editorial
(not OrchidEditorial
)
// build.gradle
...
orchid {
...
theme = "Editorial"
}
Hi!
Created a single config.yml with this:
javadoc: sourceDirs:
srcDir
to the directory containing Java fileIf i add the theme="Editorial", i get an error:
java.exe'' finished with non-zero exit value -1073740940
If i run without the theme, i get the same 2 pages generated.
If i change the srcDir to "../core/src" i still get only 2 pages generated.
Do you have this project pushed to a repo that I might look at and try to figure out what's going on?
Not yet, but once i release it i will send to you.
thanks for your help!
Hi,
this project looks very cool ! Thanks a lot for the work done !
By the way, do you support @link tags in javadoc ? When I generate it, I have '{@link MyClass}' as output instead of having a link.
Thanks by advance.
@elR1co that looks like a bug, I've opened a new issue to track it #251
Hi!
This seems to be a great tool, but is it possible to generate the javadocs with Orchid from the command line? I saw the javadocs wiki but it seems to be incomplete.
thanks and keep up the good work!
guich