-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
71 lines (64 loc) · 1.92 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
67
68
69
70
71
plugins {
id 'org.asciidoctor.jvm.convert' version '4.0.3'
id 'org.asciidoctor.jvm.pdf' version '4.0.3'
}
defaultTasks 'clean', 'asciidoctor'
repositories {
mavenCentral()
}
asciidoctorj {
// asciidoctorj 3.0.0 doesn't seem to work with asciidoctor-gradle-plugin 4.0.3
version = '2.5.13'
modules {
pdf {
version '2.3.18'
}
}
docExtensions file('doc-extension.groovy')
}
asciidoctor {
baseDirFollowsSourceDir()
executionMode = OUT_OF_PROCESS
sources {
include 'jaybird_manual.adoc'
}
attributes 'revnumber': false, 'stylesdir': file('src/docs/theme/jaybird-html'), 'stylesheet': 'firebird.css',
'docinfo': 'shared', 'docinfodir': file('src/docs/theme/jaybird-html/docinfo')
jvm {
jvmArgs "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED"
}
}
pdfThemes {
local 'jaybird', {
themeDir = file('src/docs/theme/jaybird-pdf')
themeName = 'jaybird'
}
}
asciidoctorPdf {
baseDirFollowsSourceDir()
executionMode = OUT_OF_PROCESS
sources {
include 'jaybird_manual.adoc'
}
attributes 'revnumber': false, 'source-highlighter': 'rouge', 'media': 'prepress', 'compress': '',
'icon-set': 'fas', 'pdf-fontsdir': "${file('src/docs/theme/fonts')},GEM_FONTS_DIR"
theme 'jaybird'
jvm {
jvmArgs "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens", "java.base/java.io=ALL-UNNAMED"
}
}
// Create the HTML and PDF output and copy them to the build/pages folder
// Primarily intended for the GitHub Actions build to deploy to GitHub pages
tasks.register('makePages') {
dependsOn asciidoctor, asciidoctorPdf
doLast {
copy {
from asciidoctor.outputs
into "$buildDir/pages"
}
copy {
from asciidoctorPdf.outputs
into "$buildDir/pages"
}
}
}