mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-11-22 07:12:04 +01:00
WIP: Add task for generating man pages
This commit is contained in:
parent
3801a644ef
commit
8c581d459a
1 changed files with 23 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
plugins {
|
||||
id 'application'
|
||||
id 'org.asciidoctor.jvm.convert' version '3.1.0'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -23,6 +24,7 @@ dependencies {
|
|||
|
||||
// CLI
|
||||
implementation "info.picocli:picocli:$picocliVersion"
|
||||
annotationProcessor "info.picocli:picocli-codegen:$picocliVersion"
|
||||
|
||||
// @Nonnull, @Nullable...
|
||||
implementation "com.google.code.findbugs:jsr305:$jsrVersion"
|
||||
|
@ -49,3 +51,24 @@ jar {
|
|||
exclude "META-INF/*.RSA"
|
||||
}
|
||||
}
|
||||
|
||||
task generateManpageAsciiDoc(type: JavaExec) {
|
||||
dependsOn(classes)
|
||||
group = "Documentation"
|
||||
description = "Generate AsciiDoc manpage"
|
||||
classpath(configurations.annotationProcessor, sourceSets.main.runtimeClasspath)
|
||||
systemProperty("user.language", "en")
|
||||
main 'picocli.codegen.docgen.manpage.ManPageGenerator'
|
||||
args mainClassName, "--outdir=${project.buildDir}/generated-picocli-docs", "-v" //, "--template-dir=src/docs/mantemplates"
|
||||
}
|
||||
|
||||
apply plugin: 'org.asciidoctor.jvm.convert'
|
||||
asciidoctor {
|
||||
dependsOn(generateManpageAsciiDoc)
|
||||
sourceDir = file("${project.buildDir}/generated-picocli-docs")
|
||||
outputDir = file("${project.buildDir}/docs")
|
||||
logDocuments = true
|
||||
outputOptions {
|
||||
backends = ['manpage', 'html5']
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue