Reputation: 37
test {
useJUnitPlatform()
outputs.dir snippetsDir
}
asciidoctor {
configurations "asciidoctorExtensions"
inputs.dir snippetsDir
dependsOn test
doLast {
copy{
from ("${asciidoctor.outputDir}/html5")
into "$buildDir/resources/main/public/docs")
include "**/*.html"
}
Here is the example i refered the above solution from-
https://github.com/spring-projects/spring-restdocs-samples/blob/main/restful-notes-spring-hateoas/build.gradle
I am getting below error when i try to load index HTML
Unresolved directive in index.adoc - include::child.adoc[]
I tried below solution -
THe below solution didn't worked
asciidoctor {
configurations 'asciidoctorExtensions'
inputs.dir snippetsDir
sources {
include 'index.adoc'
}
dependsOn test
}
Upvotes: 1
Views: 24
Reputation: 37
github.com/asciidoctor/asciidoctor-gradle-plugin/issues/549 . Adding asciidoctor.baseDirFollowsSourceDir() in the asciidoctor task fix the issue.The asciidoctor.jvm.convert version should be greater than 3.3.1
Upvotes: 1