Login  Register

Gradle asciidoctor plugin v2 not working

Posted by DocEvaluator on Apr 25, 2019; 7:52am
URL: https://discuss.asciidoctor.org/Gradle-asciidoctor-plugin-v2-not-working-tp6865.html

We successfully got Asciidoctor working, with version 1.5.x inside our Gradle script (build.gradle).

I now wanted to try the 2.0 version of the plugin, but it just doesn't do anything.
I tried to follow the instructions here: https://github.com/asciidoctor/asciidoctor-gradle-plugin
The build.gradle looks like this:

buildscript {
    repositories {
        jcenter()
    }
}

plugins {
    id 'org.asciidoctor.jvm.base' version '2.0.0' // (1)
    id 'org.asciidoctor.jvm.convert' version '2.0.0' // (2)
}

asciidoctor {
  println ("asciidoctor task")
  sourceDir  file('src/asciidoc')
  sources {
    include 'test.adoc'
  }
  outputDir  file('build/docs')
}

I see the message "asciidoctor task" get printed, but the task does not do anything!
I also deleted the task attributes, so that the standard attributes of the generic task are taken, but with no effect either.
I also tried other syntax options (Gradle gives you some freedom/options), but with no effect.
What am I doing wrong?