Merge branch 'manPages'

This commit is contained in:
Paul Schaub 2022-08-08 00:15:05 +02:00
commit 04d38b988a

View file

@ -4,6 +4,7 @@
plugins { plugins {
id 'application' id 'application'
id 'org.asciidoctor.jvm.convert' version '3.1.0'
} }
dependencies { dependencies {
@ -23,6 +24,7 @@ dependencies {
// CLI // CLI
implementation "info.picocli:picocli:$picocliVersion" implementation "info.picocli:picocli:$picocliVersion"
annotationProcessor "info.picocli:picocli-codegen:$picocliVersion"
// @Nonnull, @Nullable... // @Nonnull, @Nullable...
implementation "com.google.code.findbugs:jsr305:$jsrVersion" implementation "com.google.code.findbugs:jsr305:$jsrVersion"
@ -49,3 +51,24 @@ jar {
exclude "META-INF/*.RSA" 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']
}
}