Initial commit (split from bld-kotlin)
This commit is contained in:
commit
a46ed2c012
67 changed files with 3428 additions and 0 deletions
80
README.md
Normal file
80
README.md
Normal file
|
@ -0,0 +1,80 @@
|
|||
# [bld](https://rife2.com/bld) Extension to Generate API Documentation with [Dokka](https://github.com/Kotlin/dokka) for [Kotlin](https://kotlinlang.org/)
|
||||
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
|
||||
[](https://rife2.com/bld)
|
||||
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-dokka)
|
||||
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-dokka)
|
||||
[](https://github.com/rife2/bld-dokka/actions/workflows/bld.yml)
|
||||
|
||||
To install, please refer to the [extensions](https://github.com/rife2/bld/wiki/Extensions) and [support](https://github.com/rife2/bld/wiki/Kotlin-Support)
|
||||
documentation.
|
||||
|
||||
## Generate API Documentation
|
||||
|
||||
To generate a project's documentation in various formats:
|
||||
|
||||
```java
|
||||
@BuildCommand(value = "dokka-gfm", summary = "Generates documentation in GitHub flavored markdown format")
|
||||
public void dokkaGfm() throws ExitStatusException, IOException, InterruptedException {
|
||||
new DokkaOperation()
|
||||
.fromProject(this)
|
||||
.loggingLevel(LoggingLevel.INFO)
|
||||
// Create build/dokka/gfm
|
||||
.outputDir(Path.of(buildDirectory().getAbsolutePath(), "dokka", "gfm").toFile())
|
||||
.outputFormat(OutputFormat.MARKDOWN)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(value = "dokka-html", summary = "Generates documentation in HTML format")
|
||||
public void dokkaHtml() throws ExitStatusException, IOException, InterruptedException {
|
||||
new DokkaOperation()
|
||||
.fromProject(this)
|
||||
.loggingLevel(LoggingLevel.INFO)
|
||||
// Create build/dokka/html
|
||||
.outputDir(Path.of(buildDirectory().getAbsolutePath(), "dokka", "html").toFile())
|
||||
.outputFormat(OutputFormat.HTML)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(value = "dokka-jekyll", summary = "Generates documentation in Jekyll flavored markdown format")
|
||||
public void dokkaJekyll() throws ExitStatusException, IOException, InterruptedException {
|
||||
new DokkaOperation()
|
||||
.fromProject(this)
|
||||
.loggingLevel(LoggingLevel.INFO)
|
||||
// Create build/dokka/jekyll
|
||||
.outputDir(Path.of(buildDirectory().getAbsolutePath(), "dokka", "jekkyl").toFile())
|
||||
.outputFormat(OutputFormat.JEKYLL)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Generates Javadoc for the project")
|
||||
@Override
|
||||
public void javadoc() throws ExitStatusException, IOException, InterruptedException {
|
||||
new DokkaOperation()
|
||||
.fromProject(this)
|
||||
.failOnWarning(true)
|
||||
.loggingLevel(LoggingLevel.INFO)
|
||||
// Create build/javadoc
|
||||
.outputDir(new File(buildDirectory(), "javadoc"))
|
||||
.outputFormat(OutputFormat.JAVADOC)
|
||||
.execute();
|
||||
}
|
||||
```
|
||||
|
||||
```console
|
||||
./bld javadoc
|
||||
./bld dokka-html
|
||||
./bld dokka-gfm
|
||||
./bld dokka-jekyll
|
||||
```
|
||||
|
||||
- [View Examples Project](https://github.com/rife2/bld-dokka/tree/main/examples/)
|
||||
|
||||
Please check the [Dokka Operation documentation](https://rife2.github.io/bld-dokka/rife/bld/extension/DokkaOperation.html#method-summary)
|
||||
for all available configuration options.
|
||||
|
||||
## Template Project
|
||||
|
||||
There is also a [Kotlin Template Project](https://github.com/rife2/kotlin-bld-example) with support for Dokka and the
|
||||
[Detekt](https://github.com/rife2/bld-detekt) extensions.
|
Loading…
Add table
Add a link
Reference in a new issue