Created
December 9, 2014 17:00
-
-
Save ysb33r/9f2d5e9b7b9a8eb32f64 to your computer and use it in GitHub Desktop.
Asciidoctor-packt with Gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A minimum Gradle file to get you started with asciidoctor-packt | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'org.ysb33r.gradle:vfs-gradle-plugin:1.0-beta1' | |
classpath 'commons-httpclient:commons-httpclient:3.1' | |
} | |
} | |
plugins { | |
id "org.asciidoctor.convert" version "1.5.2" | |
} | |
apply plugin : 'org.asciidoctor.gradle.asciidoctor' | |
apply plugin: 'org.ysb33r.vfs' | |
ext { | |
asciidoctorPacktVersion = 'master' | |
downloadDir = new File(buildDir,'download') | |
templateDir = new File(downloadDir,'templates') | |
} | |
repositories { | |
jcenter() | |
} | |
task download << { | |
mkdir downloadDir | |
vfs { | |
cp "zip:https://github.com/gregturn/asciidoctor-packt/archive/${asciidoctorPacktVersion}.zip!asciidoctor-packt-${asciidoctorPacktVersion}", | |
templateDir, recursive:true, overwrite:true | |
} | |
} | |
download { | |
outputs.dir templateDir | |
} | |
asciidoctor { | |
backends 'packt' | |
options eruby: 'erubis' | |
options template_dirs : [ "${templateDir}/slim" ] | |
dependsOn download | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment