-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.gradle
66 lines (59 loc) · 1.5 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
61
62
63
64
65
66
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.6.0'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.3'
classpath 'org.ajoberstar:gradle-git:1.6.0-rc.1'
}
}
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'org.ajoberstar.github-pages'
apply plugin: 'com.github.ben-manes.versions'
asciidoctorj {
version = '1.5.5'
}
asciidoctor {
backends 'pdf','html5'
outputDir = file("$buildDir/docs")
sources {
include 'index.asc'
include 'index_zh.asc'
}
resources {
from ('src/docs/asciidoc') {
include '**/*.png'
include '**/*.jpg'
include '**/*.jpeg'
}
}
options doctype: 'book'
attributes \
'source-highlighter': 'prettify',
'toc': 'left',
'toc-title': 'Table of Contents',
'pdf-fontsdir': 'fonts',
'pdf-stylesdir': 'theme',
'pdf-style': 'fxdocs'
}
defaultTasks 'asciidoctor'
task run(dependsOn:asciidoctor)
githubPages {
repoUri = 'https://github.com/FXDocs/docs.git'
pages {
from(file('build/docs/html5')) {
include 'index.html'
include '**/*.png'
include '**/*.jpg'
include '**/*.jpeg'
into '.'
}
from(file('build/docs/pdf')) {
include 'index.pdf'
rename ('index.pdf', 'book.pdf')
into '.'
}
}
}