Add test to ensure that the test directory exists
diff --git a/gradle/asciidoctor.gradle b/gradle/asciidoctor.gradle
index 0eb9b20..5997760 100644
--- a/gradle/asciidoctor.gradle
+++ b/gradle/asciidoctor.gradle
@@ -85,9 +85,12 @@
asciidoctor {
def errors = new LinkedHashSet<String>()
doFirst {
- file('src/spec/test').eachFileRecurse { file ->
- if (file.isFile()) {
- adocSanityCheck(file, file.getText('utf-8'), errors)
+ def specTestDir = file('src/spec/test')
+ if (specTestDir.exists()) {
+ specTestDir.eachFileRecurse { file ->
+ if (file.isFile()) {
+ adocSanityCheck(file, file.getText('utf-8'), errors)
+ }
}
}
if (errors) {