You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gradle-plugins/gradle-plugin-asciidoctor/src/main/groovy/org/xbib/gradle/plugin/asciidoctor/AsciidoctorBackend.groovy

33 lines
662 B
Groovy

package org.xbib.gradle.plugin.asciidoctor
enum AsciidoctorBackend {
HTML('html'),
DOCBOOK('docbook'),
HTML5('html5'),
DOCBOOK45('docbook45'),
DOCBOOK5('docbook5'),
EPUB3('epub3'),
PDF('pdf'),
XHTML('xhtml'),
XHTML5('xhtml5'),
private final static Map<String, AsciidoctorBackend> ALL_BACKENDS
private final String id
static {
ALL_BACKENDS = values().collectEntries{ [it.id, it] }.asImmutable()
}
private AsciidoctorBackend(String id) {
this.id = id
}
String getId() {
id
}
static boolean isBuiltIn(String name) {
ALL_BACKENDS.containsKey(name)
}
}