-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
60 lines (49 loc) · 1.45 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.6'
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.1.11'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.7'
// classpath 'com.bluepapa32:gradle-watch-plugin:0.1.4'
}
}
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'com.github.jruby-gradle.base'
apply plugin: 'com.github.ben-manes.versions'
repositories {
mavenLocal()
jcenter()
}
dependencies {
gems 'rubygems:asciidoctor-diagram:1.2.1'
}
asciidoctor {
// let jruby-gradle download and install gems
dependsOn jrubyPrepareGems
// include the diagram gem
requires = ['asciidoctor-diagram']
gemPath = jrubyPrepareGems.outputDir
options doctype: 'book'
// let's convert to PDF while we're at it
backends = ['html5'] // pdf
attributes 'source-highlighter' : 'coderay',
'coderay-linenums-mode' : 'table',
toc : 'left',
icon : 'font',
linkattrs : true,
encoding : 'utf-8'
resources {
from('src/docs/asciidoc') {
include '**/*.png'
}
}
}
asciidoctor.doLast {
copy {
from "$outputDir/html5"
into "html"
}
}