Use the same version of AsciidoctorJ to avoid classpath issues
package com.bmuschko.gradle.docker
+import org.asciidoctor.gradle.AsciidoctorExtension
import org.asciidoctor.gradle.AsciidoctorPlugin
import org.asciidoctor.gradle.AsciidoctorTask
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.util.PatternSet
import org.gradle.kotlin.dsl.apply
+import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.delegateClosureOf
import org.gradle.kotlin.dsl.named
class UserGuidePlugin : Plugin<Project> {
override fun apply(project: Project): Unit = project.run {
applyAsciidocPlugin()
+ configureAsciidoctorExtension()
configureAsciidoctorTask()
}
@@ -20,6 +23,13 @@ class UserGuidePlugin : Plugin<Project> {
apply<AsciidoctorPlugin>()
}
+ private
+ fun Project.configureAsciidoctorExtension() {
+ configure<AsciidoctorExtension> {
+ setVersion("1.6.0-alpha.7")
+ }
+ }
+
private
fun Project.configureAsciidoctorTask() {
tasks.named<AsciidoctorTask>("asciidoctor") {
