-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
97 lines (82 loc) · 2.18 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
// This Gradle script builds the resources distribution
// There's nothing java in here, but apparently the java plugin
// makes magic things like reading gradle.properties and directing
// zip output into build/distributions work. :-(
plugins {
id "java"
}
defaultTasks 'copyAll'
task copyAll(dependsOn: [ "copyBase", "copySlides", "copyPublishers" ]) {
// nop
}
// ============================================================
task copyBase() {
// nop
}
["js","css","img","xml"].each { String dir ->
String taskName = "copyBase_" + dir
Task t = task "$taskName" (type: Copy) {
doFirst {
mkdir("build/stage/" + dir)
}
from "base/" + dir
into "build/stage/" + dir
}
copyBase.dependsOn "$taskName"
}
// ============================================================
task copySlides() {
// nop
}
["js","css", "xml"].each { String dir ->
String taskName = "copySlides_" + dir
Task t = task "$taskName" (type: Copy) {
doFirst {
mkdir("build/stage/" + dir)
}
from "slides/" + dir
into "build/stage/" + dir
}
copySlides.dependsOn "$taskName"
}
task copySlides_img(type: Copy) {
doFirst {
mkdir("build/stage/img/slides")
}
from "slides/img"
into "build/stage/img/slides"
}
copySlides.dependsOn "copySlides_img"
task copySlides_imgPrint(type: Copy) {
doFirst {
mkdir("build/stage/img/slides/print")
}
from "slides/print"
into "build/stage/img/slides/print"
}
copySlides.dependsOn "copySlides_imgPrint"
// ============================================================
task copyPublishers() {
// nop
}
["js","css","img", "xml"].each { String dir ->
String taskName = "copyPublishers_" + dir
Task t = task "$taskName" (type: Copy) {
doFirst {
mkdir("build/stage/" + dir)
}
from "publishers/" + dir
into "build/stage/" + dir
}
copyPublishers.dependsOn "$taskName"
}
// ============================================================
task dist(type: Zip, dependsOn: [ "copyAll" ]) {
from('build/stage')
into 'docbook-xslt20-resources-' + version
archiveName 'docbook-xslt20-resources-' + version + ".zip"
}
// ============================================================
clean.doLast {
delete "build"
}