Moved Dokka operation to its own extension
This commit is contained in:
parent
1623b902f9
commit
8d34f37af0
19 changed files with 26 additions and 1828 deletions
|
@ -16,12 +16,3 @@
|
|||
```console
|
||||
./bld test
|
||||
```
|
||||
|
||||
## Build the documentation with [Dokka](https://github.com/Kotlin/dokka)
|
||||
|
||||
```console
|
||||
./bld javadoc
|
||||
./bld dokka-html
|
||||
./bld dokka-gfm
|
||||
./bld dokka-jekyll
|
||||
```
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.extensions=com.uwyn.rife2:bld-kotlin:0.9.8
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.downloadLocation=
|
||||
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.0.0-SNAPSHOT
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.sourceDirectories=
|
||||
bld.version=1.9.1
|
||||
|
|
|
@ -3,9 +3,6 @@ package com.example;
|
|||
import rife.bld.BuildCommand;
|
||||
import rife.bld.Project;
|
||||
import rife.bld.extension.CompileKotlinOperation;
|
||||
import rife.bld.extension.dokka.DokkaOperation;
|
||||
import rife.bld.extension.dokka.LoggingLevel;
|
||||
import rife.bld.extension.dokka.OutputFormat;
|
||||
import rife.bld.operations.exceptions.ExitStatusException;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -48,14 +45,14 @@ public class ExampleBuild extends Project {
|
|||
|
||||
public static void main(String[] args) {
|
||||
// Enable detailed logging for the Kotlin extension
|
||||
// var level = Level.ALL;
|
||||
// var logger = Logger.getLogger("rife.bld.extension");
|
||||
// var consoleHandler = new ConsoleHandler();
|
||||
|
||||
// consoleHandler.setLevel(level);
|
||||
// logger.addHandler(consoleHandler);
|
||||
// logger.setLevel(level);
|
||||
// logger.setUseParentHandlers(false);
|
||||
// var level = Level.ALL;
|
||||
// var logger = Logger.getLogger("rife.bld.extension");
|
||||
// var consoleHandler = new ConsoleHandler();
|
||||
//
|
||||
// consoleHandler.setLevel(level);
|
||||
// logger.addHandler(consoleHandler);
|
||||
// logger.setLevel(level);
|
||||
// logger.setUseParentHandlers(false);
|
||||
|
||||
new ExampleBuild().start(args);
|
||||
}
|
||||
|
@ -72,50 +69,4 @@ public class ExampleBuild extends Project {
|
|||
// op.compileOptions().verbose(true);
|
||||
// op.execute();
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue