Login  Register

Re: Gradle asciidoctor plugin v2 not working

Posted by mojavelinux on Apr 25, 2019; 8:37am
URL: https://discuss.asciidoctor.org/Gradle-asciidoctor-plugin-v2-not-working-tp6865p6866.html

First, 2.1.0 of the plugin is available. You'll want to upgrade as that addressed several bugs that were discovered. See https://github.com/asciidoctor/asciidoctor-gradle-plugin/releases/tag/release_2_1_0 for details.

Although more advanced then just a simple build, this example should help you get your feet wet.


What we really need is 2.1.0 supported in the gradle examples here: https://github.com/asciidoctor/asciidoctor-gradle-examples (In fact, there's already an open request).

Cheers,

-Dan

On Thu, Apr 25, 2019 at 1:52 AM DocEvaluator [via Asciidoctor :: Discussion] <[hidden email]> wrote:
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?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Gradle-asciidoctor-plugin-v2-not-working-tp6865.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux