/
build.gradle
94 lines (73 loc) · 2.47 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
plugins {
id 'base'
id 'java'
}
ext.architecture = "linux-x86_64" // TODO make adjustable
ext.toolDir = "$buildDir/tools"
ext.dataDir = file('data', PathValidation.DIRECTORY)
group = 'net.faustedition'
version = '1.0-SNAPSHOT'
description = 'Faust-Edition Site Generation'
sourceCompatibility = '1.8'
repositories {
mavenLocal()
// Firefox and SlimerJS need to be downloaded directly:
ivy {
url "https://ftp.mozilla.org/pub"
patternLayout {
artifact "[module]/releases/[revision]/$architecture/en-US/[module]-[revision](.[ext])"
}
content { includeGroup "org.mozilla" }
}
ivy {
url "https://download.slimerjs.org/"
patternLayout {
artifact "releases/[revision]/[module]-[revision](.[ext])"
}
content { includeGroup "slimerjs" }
}
mavenCentral()
// maven { url = 'http://dev.digital-humanities.de/nexus/content/groups/public' }
maven { url = 'http://dev.dariah.eu/nexus/content/groups/public' }
maven { url = 'http://maven.restlet.com' }
maven { url = 'https://raw.github.com/eXist-db/mvn-repo/master/' }
}
configurations {
tools
}
dependencies {
implementation 'org.nanohttpd:nanohttpd-webserver:2.2.0'
implementation 'de.faustedition:faust:1.4-SNAPSHOT'
implementation 'com.mycila:mycila-xmltool:4.4.ga'
implementation 'com.google.guava:guava-collections:r03'
implementation 'com.xmlcalabash:xmlcalabash:1.1.13-96'
tools 'slimerjs:slimerjs:1.0.0@tar.bz2'
tools 'org.mozilla:firefox:59.0@tar.bz2'
testCompile 'junit:junit:4.12'
}
task getTools(type: Copy) {
configurations.tools.asFileTree.each {
from(tarTree(it))
}
into toolDir
}
task generateSVGs(type: JavaExec) {
dependsOn getTools
dependsOn classes
inputs.dir("$dataDir/xml/transcript")
outputs.dir("$buildDir/www/transcript")
environment 'LANG', 'en_US.UTF-8'
environment 'LC_ALL', 'en_US.UTF-8'
environment 'SLIMERJSLAUNCHER', "$toolDir/firefox/firefox"
systemProperties([
'phantomjs.binary': "$toolDir/slimerjs-1.0.0/slimerjs" ,
'faust.diplo.target': buildDir
])
systemProperties(project.properties.findAll {key, value -> key.matches('^faust\\.diplo\\.')})
classpath sourceSets.main.runtimeClasspath
main 'net.faustedition.gen.DiplomaticConversion'
}
build.dependsOn generateSVGs
task showProps { doLast {
project.properties.each { key, value -> println "$key=$value"}
}}