Login  Register

Re: Gradle asciidoctor plugin v2 not working

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

Seems to be a Gradle problem (or my lack of deep Gradle understanding).
This works:

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

repositories {
  jcenter()
}

asciidoctorj {
    version = '1.6.2' 
}

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

So I had to move
repositories {
  jcenter()
}
out of "buildscript" and put it behind the "plugins" stuff.
I will try to look up Gradle doc, why this makes a difference (with 1.5.x we had it inside the "buildscript" block at the very beginning).