-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
66 lines (59 loc) · 1.67 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
plugins {
id 'org.asciidoctor.convert' version '1.5.3'
id 'org.kordamp.gradle.livereload' version '0.2.1'
}
apply plugin: 'org.asciidoctor.convert'
apply plugin: 'org.kordamp.gradle.livereload'
asciidoctorj {
version = '1.5.5'
}
//Wrapper
/*
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '4.7'
}
*/
asciidoctor {
description = project.description
logDocuments = true
backends 'html5'
sourceDir = file('src/main/asciidoc')
sources {
include '**/*.adoc'
}
resources {
from(sourceDir) {
include '**/*.png'
include '**/*.jpg'
include '**/*.java'
}
into '.'
}
attributes 'icons': 'font',
'title': project.name,
'revnumber': '2.4.16',
'toc': 'left',
'toc-title':'Table of Contents',
'encoding': 'utf-8',
'linkcss': true,
'idprefix':'',
'idseparator':'-',
'numbered': true,
'linkattrs': true,
//'source-highlighter': 'highlightjs',
'source-highlighter': 'prettify'
//'docinfodir': 'docinfo',
//'docinfo': 'shared'
outputDir = file('build/docs')
}
defaultTasks 'asciidoctor'
liveReload {
docRoot asciidoctor.outputDir.canonicalPath
}
task serve << {
SimpleHttpFileServerFactory factory = new SimpleHttpFileServerFactory()
HttpFileServer server = factory.start(new File("./build/docs/html5"), 8080)
println("Server Started on 8080 ctrc+c to kill it")
java.lang.Thread.sleep(Long.MAX_VALUE);
}