@@ -117,9 +117,27 @@ sonarqube {
117
117
}
118
118
}
119
119
120
+ task(' makePDF' , type : org.asciidoctor.gradle.AsciidoctorTask ){
121
+ dependsOn prepareAsciidocBuild
122
+ backends ' pdf'
123
+ sourceDir " $buildDir /asciidoc/assemble"
124
+ outputDir = new File (" $buildDir /docs" )
125
+ sources {
126
+ include ' index.adoc'
127
+ }
128
+ options doctype : ' book' , eruby : ' erubis'
129
+ logDocuments = true
130
+ attributes ' docinfo' : ' shared' ,
131
+ ' icons' : ' font' ,
132
+ ' sectanchors' : ' ' ,
133
+ ' source-highlighter' : ' coderay' ,
134
+ ' spring-ldap-version' : project. version,
135
+ revnumber : project. version
136
+ }
137
+
120
138
asciidoctor {
121
- dependsOn prepareAsciidocBuild
122
- backends ' html5' , ' pdf '
139
+ dependsOn makePDF
140
+ backends ' html5'
123
141
sourceDir " $buildDir /asciidoc/assemble"
124
142
outputDir = new File (" $buildDir /docs" )
125
143
sources {
@@ -142,30 +160,11 @@ asciidoctor {
142
160
// use provided highlighter
143
161
' source-highlighter=highlight.js' ,
144
162
' highlightjsdir=js/highlight' ,
145
- ' highlightjs-theme=atom-one-dark-reasonable'
163
+ ' highlightjs-theme=atom-one-dark-reasonable' ,
164
+ ' spring-ldap-version' : project. version,
165
+ revnumber : project. version
146
166
}
147
167
148
-
149
- /* asciidoctor {
150
- outputDir = new File("$buildDir/docs")
151
- options = [
152
- eruby: 'erubis',
153
- attributes: [
154
- copycss : '',
155
- icons : 'font',
156
- 'source-highlighter': 'prettify',
157
- sectanchors : '',
158
- toc2: '',
159
- idprefix: '',
160
- idseparator: '-',
161
- doctype: 'book',
162
- numbered: '',
163
- 'spring-ldap-version' : project.version,
164
- revnumber : project.version
165
- ]
166
- ]
167
- } */
168
-
169
168
task api (type : Javadoc ) {
170
169
group = " Documentation"
171
170
description = " Generates aggregated Javadoc API documentation."
@@ -201,6 +200,11 @@ task docsZip(type: Zip, dependsOn: asciidoctor) {
201
200
202
201
from (new File (asciidoctor. outputDir, " html5" )) {
203
202
include " *.html"
203
+ include ' images/*' , ' css/**' , ' js/**'
204
+ into " reference"
205
+ }
206
+ from (new File (asciidoctor. outputDir, " pdf" )) {
207
+ include " *.pdf"
204
208
into " reference"
205
209
}
206
210
}
0 commit comments