-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
95 lines (82 loc) · 2.57 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
repositories {
mavenLocal()
mavenCentral()
}
configurations {
tools {
description = "Run tools"
transitive = true
}
}
dependencies {
tools (
[group: 'org.relaxng', name: 'jing', version: '20181204'],
[group: 'org.relaxng', name: 'trang', version: '20181204']
)
}
defaultTasks 'specification'
apply plugin: 'com.xmlcalabash.task'
import com.xmlcalabash.XMLCalabashTask
import com.nwalsh.tasks.StripAmblesTask
task xinclude(dependsOn: [":spec_schemas"], type: XMLCalabashTask) {
inputs.files fileTree(dir: "src/main/xml/")
outputs.file "build/xinclude.xml"
input("source", "src/main/xml/specification.xml")
output("result", "build/xinclude.xml")
pipeline "../tools/xpl/validate.xpl"
}
xinclude.doFirst {
mkdir("build")
}
task source(dependsOn: ["glossary"], type: XMLCalabashTask) {
inputs.file "../tools/xsl/masterbib.xsl"
inputs.file "../src/main/xml/bibliography.xml"
inputs.file "src/main/xml/specification.xml"
inputs.file "build/glossary.xml"
outputs.file "build/source.xml"
input("source", "src/main/xml/specification.xml")
output("result", "build/source.xml")
pipeline "../tools/xpl/validate.xpl"
}
task glossary(dependsOn: ["xinclude"], type: XMLCalabashTask) {
inputs.file "build/xinclude.xml"
inputs.file "../tools/xpl/makeglossary.xpl"
inputs.file "../tools/xsl/makeglossary.xsl"
outputs.file "build/glossary.xml"
input("source", "build/xinclude.xml")
output("result", "build/glossary.xml")
pipeline "../tools/xpl/makeglossary.xpl"
}
task library(dependsOn: ["source"], type: XMLCalabashTask) {
inputs.file "build/source.xml"
inputs.file "../tools/xpl/typed-pipeline-library.xpl"
inputs.file "../tools/xsl/typed-pipeline-library.xsl"
outputs.file "build/library.xml"
input("source", "build/source.xml")
output("result", "build/library.xml")
pipeline "../tools/xpl/typed-pipeline-library.xpl"
}
task rnc(dependsOn: ["library"], type: XMLCalabashTask) {
inputs.file "build/library.xml"
inputs.file "../tools/xpl/library-to-rnc.xpl"
inputs.file "../tools/xsl/library-to-rnc.xsl"
outputs.file "build/steps.rnc"
input("source", "build/library.xml")
output("result", "build/steps.rnc")
pipeline "../tools/xpl/library-to-rnc.xpl"
}
task rng(dependsOn: ["rnc"], type: JavaExec) {
inputs.file "build/steps.rnc"
outputs.file "build/steps.rng"
classpath = configurations.tools
mainClass = 'com.thaiopensource.relaxng.translate.Driver'
args = ["build/steps.rnc", "build/steps.rng"]
}
task specification(dependsOn: [ "source", "library", "rng" ]) {
// nop
}
task clean() {
doFirst {
delete("build")
}
}