forked from cuba-platform/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
408 lines (324 loc) · 10.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
plugins {
id "com.moowork.node" version "1.1.0"
}
ext.docVersion = '7.1'
ext.docHome = 'https://doc.cuba-platform.com'
//ext.canonicalVer = '7.0'
repositories {
mavenCentral()
}
apply(plugin: 'doc')
configurations {
tomcat
}
dependencies {
tomcat(group: 'org.apache.tomcat', name: 'tomcat', version: '8.5.28', ext: 'zip')
}
task clean(type: Delete) {
delete 'build', 'buildSrc/build'
}
task buildCubaTheme(type: BuildAsciidoctorTheme) {
themeName = 'cuba'
}
def tomcatDir = "$rootDir/deploy/tomcat"
def webappsDir = "$tomcatDir/webapps"
task setupTomcat(type: SetupTomcat) {
dir = tomcatDir
}
/* ============= Manual =================*/
task buildManualEn(type: Asciidoc2Html) {
docName = 'manual'
docLang = 'en'
}
task buildManualRu(type: Asciidoc2Html) {
docName = 'manual'
docLang = 'ru'
}
task chopManualEn(dependsOn: [buildManualEn], type: CreateMultiPageDoc) {
docName = 'manual'
docLang = 'en'
docTitle = "<a href='https://www.cuba-platform.com/manual' target='_blank'>CUBA Platform</a>. Developer’s Manual"
}
task chopManualRu(dependsOn: [buildManualRu], type: CreateMultiPageDoc) {
docName = 'manual'
docLang = 'ru'
docTitle = "<a href='https://www.cuba-platform.ru/manual' target='_blank'>Платформа CUBA</a>. Руководство по разработке приложений"
}
task warManualEn(dependsOn: [chopManualEn], type: CreateWar) {
docName = 'manual'
docLang = 'en'
docVer = docVersion
}
task warManualRu(dependsOn: [chopManualRu], type: CreateWar) {
docName = 'manual'
docLang = 'ru'
docVer = docVersion
}
task deployManualEn(dependsOn: warManualEn, type: Copy) {
from warManualEn
into webappsDir
}
task deployManualRu(dependsOn: warManualRu, type: Copy) {
from warManualRu
into webappsDir
}
/* ============= Reporting =================*/
task buildReportingEn(type: Asciidoc2Html) {
docName = 'reporting'
docLang = 'en'
}
task buildReportingRu(type: Asciidoc2Html) {
docName = 'reporting'
docLang = 'ru'
}
task chopReportingEn(dependsOn: [buildReportingEn], type: CreateMultiPageDoc) {
docName = 'reporting'
docLang = 'en'
docTitle = "<a href='https://www.cuba-platform.com/manual' target='_blank'>CUBA Platform</a>. Report Generator"
}
task chopReportingRu(dependsOn: [buildReportingRu], type: CreateMultiPageDoc) {
docName = 'reporting'
docLang = 'ru'
docTitle = "<a href='https://www.cuba-platform.ru/manual' target='_blank'>Платформа CUBA</a>. Генератор отчетов"
}
task warReportingEn(dependsOn: [chopReportingEn], type: CreateWar) {
docName = 'reporting'
docLang = 'en'
docVer = docVersion
}
task warReportingRu(dependsOn: [chopReportingRu], type: CreateWar) {
docName = 'reporting'
docLang = 'ru'
docVer = docVersion
}
task deployReportingEn(dependsOn: warReportingEn, type: Copy) {
from warReportingEn
into webappsDir
}
task deployReportingRu(dependsOn: warReportingRu, type: Copy) {
from warReportingRu
into webappsDir
}
/* ============= Charts =================*/
task buildChartsEn(type: Asciidoc2Html) {
docName = 'charts'
docLang = 'en'
}
task buildChartsRu(type: Asciidoc2Html) {
docName = 'charts'
docLang = 'ru'
}
task chopChartsEn(dependsOn: [buildChartsEn], type: CreateMultiPageDoc) {
docName = 'charts'
docLang = 'en'
docTitle = "<a href='https://www.cuba-platform.com/manual' target='_blank'>CUBA Platform</a>. Displaying Charts And Maps"
}
task chopChartsRu(dependsOn: [buildChartsRu], type: CreateMultiPageDoc) {
docName = 'charts'
docLang = 'ru'
docTitle = "<a href='https://www.cuba-platform.ru/manual' target='_blank'>Платформа CUBA</a>. Отображение диаграмм и карт"
}
task warChartsEn(dependsOn: [chopChartsEn], type: CreateWar) {
docName = 'charts'
docLang = 'en'
docVer = docVersion
}
task warChartsRu(dependsOn: [chopChartsRu], type: CreateWar) {
docName = 'charts'
docLang = 'ru'
docVer = docVersion
}
task deployChartsEn(dependsOn: warChartsEn, type: Copy) {
from warChartsEn
into webappsDir
}
task deployChartsRu(dependsOn: warChartsRu, type: Copy) {
from warChartsRu
into webappsDir
}
/* ============= FTS =================*/
task buildFtsEn(type: Asciidoc2Html) {
docName = 'fts'
docLang = 'en'
}
task buildFtsRu(type: Asciidoc2Html) {
docName = 'fts'
docLang = 'ru'
}
task chopFtsEn(dependsOn: [buildFtsEn], type: CreateMultiPageDoc) {
docName = 'fts'
docLang = 'en'
docTitle = "<a href='https://www.cuba-platform.com/manual' target='_blank'>CUBA Platform</a>. Full Text Search"
}
task chopFtsRu(dependsOn: [buildFtsRu], type: CreateMultiPageDoc) {
docName = 'fts'
docLang = 'ru'
docTitle = "<a href='https://www.cuba-platform.ru/manual' target='_blank'>Платформа CUBA</a>. Полнотекстовый поиск"
}
task warFtsEn(dependsOn: [chopFtsEn], type: CreateWar) {
docName = 'fts'
docLang = 'en'
docVer = docVersion
}
task warFtsRu(dependsOn: [chopFtsRu], type: CreateWar) {
docName = 'fts'
docLang = 'ru'
docVer = docVersion
}
task deployFtsEn(dependsOn: warFtsEn, type: Copy) {
from warFtsEn
into webappsDir
}
task deployFtsRu(dependsOn: warFtsRu, type: Copy) {
from warFtsRu
into webappsDir
}
/* ============= BPM =================*/
task buildBpmEn(type: Asciidoc2Html) {
docName = 'bpm'
docLang = 'en'
}
task buildBpmRu(type: Asciidoc2Html) {
docName = 'bpm'
docLang = 'ru'
}
task chopBpmEn(dependsOn: [buildBpmEn], type: CreateMultiPageDoc) {
docName = 'bpm'
docLang = 'en'
docTitle = "<a href='https://www.cuba-platform.com/manual' target='_blank'>CUBA Platform</a>. Business Process Management"
}
task chopBpmRu(dependsOn: [buildBpmRu], type: CreateMultiPageDoc) {
docName = 'bpm'
docLang = 'ru'
docTitle = "<a href='https://www.cuba-platform.ru/manual' target='_blank'>Платформа CUBA</a>. Управление бизнес процессами"
}
task warBpmEn(dependsOn: [chopBpmEn], type: CreateWar) {
docName = 'bpm'
docLang = 'en'
docVer = docVersion
}
task warBpmRu(dependsOn: [chopBpmRu], type: CreateWar) {
docName = 'bpm'
docLang = 'ru'
docVer = docVersion
}
task deployBpmEn(dependsOn: warBpmEn, type: Copy) {
from warBpmEn
into webappsDir
}
task deployBpmRu(dependsOn: warBpmRu, type: Copy) {
from warBpmRu
into webappsDir
}
/* ============= BI =================*/
task buildBiEn(type: Asciidoc2Html) {
docName = 'bi'
docLang = 'en'
}
task buildBiRu(type: Asciidoc2Html) {
docName = 'bi'
docLang = 'ru'
}
task chopBiEn(dependsOn: [buildBiEn], type: CreateMultiPageDoc) {
docName = 'bi'
docLang = 'en'
docTitle = "<a href='https://www.cuba-platform.com/manual' target='_blank'>CUBA Platform</a>. BI Tools Integration"
}
task chopBiRu(dependsOn: [buildBiRu], type: CreateMultiPageDoc) {
docName = 'bi'
docLang = 'ru'
docTitle = "<a href='https://www.cuba-platform.ru/manual' target='_blank'>Платформа CUBA</a>. Интеграция с инструментами BI"
}
task warBiEn(dependsOn: [chopBiEn], type: CreateWar) {
docName = 'bi'
docLang = 'en'
docVer = docVersion
}
task warBiRu(dependsOn: [chopBiRu], type: CreateWar) {
docName = 'bi'
docLang = 'ru'
docVer = docVersion
}
task deployBiEn(dependsOn: warBiEn, type: Copy) {
from warBiEn
into webappsDir
}
task deployBiRu(dependsOn: warBiRu, type: Copy) {
from warBiRu
into webappsDir
}
/* ============= Polymer =================*/
configure(project(':polymer-module')) {
apply plugin: 'com.moowork.node'
node {
version = '8.9.4'
download = true
}
task installBowerPackages(type: NodeTask, dependsOn: npmInstall) {
script = file("node_modules/bower/bin/bower")
args = ['install','-F']
inputs.file "bower.json"
outputs.dir "bower_components"
}
task assemblePolymer(type: NodeTask, dependsOn: installBowerPackages) {
script = file("node_modules/gulp/bin/gulp.js")
args = ['build']
inputs.dir "./"
outputs.dir "../content/polymer/source/polymer-build"
}
}
task buildPolymerEn(type: Asciidoc2Html, dependsOn: [':polymer-module:assemblePolymer']) {
docName = 'polymer'
docLang = 'en'
}
task chopPolymerEn(dependsOn: [buildPolymerEn], type: CreateMultiPageDoc) {
docName = 'polymer'
docLang = 'en'
docTitle = "Polymer manual"
}
task warPolymerEn(dependsOn: [chopPolymerEn], type: CreateWar) {
docName = 'polymer'
docLang = 'en'
docVer = docVersion
}
task deployPolymerEn(dependsOn: warPolymerEn, type: Copy) {
from warPolymerEn
into webappsDir
}
/* ============= Release Notes =================*/
task buildRnEn(type: Asciidoc2Html) {
docName = 'release_notes'
docLang = 'en'
}
/* ============= Build all =================*/
task buildManualAll(dependsOn: [buildManualEn, buildManualRu])
task chopManualAll(dependsOn: [chopManualEn, chopManualRu])
task warManualAll(dependsOn: [warManualEn, warManualRu])
task deployManualAll(dependsOn: [deployManualEn, deployManualRu])
task buildReportingAll(dependsOn: [buildReportingEn, buildReportingRu])
task chopReportingAll(dependsOn: [chopReportingEn, chopReportingRu])
task warReportingAll(dependsOn: [warReportingEn, warReportingRu])
task deployReportingAll(dependsOn: [deployReportingEn, deployReportingRu])
task buildChartsAll(dependsOn: [buildChartsEn, buildChartsRu])
task chopChartsAll(dependsOn: [chopChartsEn, chopChartsRu])
task warChartsAll(dependsOn: [warChartsEn, warChartsRu])
task deployChartsAll(dependsOn: [deployChartsEn, deployChartsRu])
task buildFtsAll(dependsOn: [buildFtsEn, buildFtsRu])
task chopFtsAll(dependsOn: [chopFtsEn, chopFtsRu])
task warFtsAll(dependsOn: [warFtsEn, warFtsRu])
task deployFtsAll(dependsOn: [deployFtsEn, deployFtsRu])
task buildBpmAll(dependsOn: [buildBpmEn, buildBpmRu])
task chopBpmAll(dependsOn: [chopBpmEn, chopBpmRu])
task warBpmAll(dependsOn: [warBpmEn, warBpmRu])
task deployBpmAll(dependsOn: [deployBpmEn, deployBpmRu])
task buildBiAll(dependsOn: [buildBiEn, buildBiRu])
task chopBiAll(dependsOn: [chopBiEn, chopBiRu])
task warBiAll(dependsOn: [warBiEn, warBiRu])
task deployBiAll(dependsOn: [deployBiEn, deployBiRu])
task deployAll(dependsOn: [deployManualAll, deployReportingAll, deployChartsAll, deployFtsAll, deployBpmAll, deployBiAll])
//
task splitDoc(type: SplitDoc) {
docName = findProperty('docName')
docLang = findProperty('docLang')
dstDirName = findProperty('dstDirName')
}