2014-01-10 5 views
3

AsciiDoc .adoc 파일을 HTML로 변환하고 Gradle을 사용하고 싶습니다.Asciidoc with Gradle 작업

나는 Gradle을 처음 사용합니다. 나는 https://github.com/asciidoctor/asciidoctor-gradle-plugin 을 발견하고 아래 그렇게하는 것입니다 build.gradle이지만, Gradle을 내 수준에 당신이 Gradle installed이 있는지 확인, 다음

// 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(".") 
} 
+0

플러그인 문서와 일반적인 AsciiDoctor 문서를 공부하는 것이 도움이되지 않으면 이미이 플러그인 (Griffon, Groovy 등)을 사용하고있는 다른 빌드를 확인하십시오. –

+0

아마도 Ruby 예제가 도움이 될 것입니다 : [Guardfile] (https://gist.github.com/craibuc/9323879) – craig

답변

1

먼저 무엇을 모르고있다.

파일 이름이 .adoc, .asciidoc, .asc 또는 .ad 인 파일이 있는지 확인하십시오. 프로젝트의 서브 디렉토리 src/asciidoc에 있어야합니다. 다음 명령을 명령 줄에서 Gradle을 실행하십시오

:

내 설치가 this tutorial 작업있어

gradle asciidoctor

3

. 이미 가지고있는 것처럼 jcenter()과 함께 사용할 수 있으므로 명시 적으로 JCenter 저장소를 설정할 필요가 없습니다.

asciidoctor 플러그인이 뭔지 잘 모르겠지만 버전 0.5.0을 사용해야했습니다. 0.7.0은 내부 오류에서 실패하고 0.6.0은 일부 루비 문제에서 실패했습니다.