title: Process Asciidoc with Gradle task
body: <p>I want to convert some <a href="http://asciidoctor.org/" rel="nofollow">AsciiDoc</a> .adoc file into HTML and use Gradle for that.</p>
  
  <p>I am new to Gradle. I have found <a href="https://github.com/asciidoctor/asciidoctor-gradle-plugin" rel="nofollow">https://github.com/asciidoctor/asciidoctor-gradle-plugin</a>
  and below is <code>build.gradle</code> that is about to do that, but with my level of Gradle I don't know what to do next</p>
  
  <pre><code>// https://github.com/asciidoctor/asciidoctor-gradle-plugin
  
  buildscript {
      repositories {
          maven {
              name 'Bintray Asciidoctor repo'
              url  'http://dl.bintray.com/content/aalmiray/asciidoctor'
          }
          jcenter()
      }
  
      dependencies {
          classpath 'org.asciidoctor:asciidoctor-gradle-plugin:0.7.0'
      }
  }
  
  apply plugin: 'asciidoctor'
  
  // append below the line: apply plugin: 'asciidoctor'
  
  asciidoctor {
      outputDir = new File("$buildDir/docs")
      options = [
          eruby: 'erubis',
          attributes: [
              'source-highlighter': 'coderay',
              toc: '',
              idprefix: '',
              idseparator: '-'
          ]
      ]
      //+
      //sourceDir = new File(".")
  }
  </code></pre>