diff --git a/gradle.properties b/gradle.properties index 3d7cd2cb4..1a252dba0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,7 +10,7 @@ project_vcs = https://github.com/asciidoctor/asciidoctor-gradle-plugin.g cglibVersion = 3.3.0 jsoupVersion = 1.17.2 spockVersion = 2.3-groovy-3.0 -grolifantVersion = 2.2.3 +grolifantVersion = 3.0.0 jacocoVersion = 0.8.6 codenarcVersion = 3.3.0 nodejsGradleVersion = 2.2.0 diff --git a/js/src/main/groovy/org/asciidoctor/gradle/js/nodejs/internal/AsciidoctorJSRunner.groovy b/js/src/main/groovy/org/asciidoctor/gradle/js/nodejs/internal/AsciidoctorJSRunner.groovy index c83ba1881..81d2b476f 100644 --- a/js/src/main/groovy/org/asciidoctor/gradle/js/nodejs/internal/AsciidoctorJSRunner.groovy +++ b/js/src/main/groovy/org/asciidoctor/gradle/js/nodejs/internal/AsciidoctorJSRunner.groovy @@ -78,9 +78,14 @@ class AsciidoctorJSRunner { arguments.addAll([DOCTYPE, doctype.get()]) } - arguments.addAll(attributes.collectMany { String key, String value -> - value ? [ATTR, "${key}=${value}".toString()] : [ATTR, key] - }) + attributes.each { String key, String value -> + arguments.addAll(value ? [ATTR, "${key}=${value}".toString()] : [ATTR, key]) + } + // Cannot use the better form of code as below, due to some Groovy incompatibility + // Therefore using the above code + // arguments.addAll(attributes.collectMany { String key, String value -> + // value ? [ATTR, "${key}=${value}".toString()] : [ATTR, key] + // }) arguments.addAll(requires.collectMany { [REQUIRE, it]