forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xjc.gradle
35 lines (30 loc) · 1.44 KB
/
xjc.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
configurations {
xjc
}
dependencies {
// Cannot be updated.
xjc 'com.sun.xml.bind:jaxb-xjc:2.2.4-1'
}
task xjc {
inputs.dir "src/main/resources/xjc/medline/"
inputs.dir "src/main/resources/xjc/bibtexml/"
inputs.dir "src/main/resources/xjc/mods/"
outputs.dir "src/main/gen/org/jabref/logic/importer/fileformat/medline"
outputs.dir "src/main/gen/org/jabref/logic/importer/fileformat/bibtexml"
outputs.dir "src/main/gen/org/jabref/logic/importer/fileformat/mods"
ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.xjc.asPath)
doLast {
ant.xjc(destdir: 'src/main/gen/', package: 'org.jabref.logic.importer.fileformat.medline') {
schema(dir: 'src/main/resources/xjc/medline', includes: 'medline.xsd')
}
ant.xjc(destdir: 'src/main/gen/', package: 'org.jabref.logic.importer.fileformat.bibtexml') {
schema(dir: 'src/main/resources/xjc/bibtexml', includes: 'bibtexml.xsd')
}
ant.xjc(destdir: 'src/main/gen/', package: 'org.jabref.logic.importer.fileformat.mods') {
arg(value: '-npa') //don't create package-info.java because it was manually added in src/main/java to ensure the namespace prefix mapping
schema(dir: 'src/main/resources/xjc/mods', includes: 'mods-3-6.xsd')
binding(dir: 'src/main/resources/xjc/mods', includes: 'mods-binding.xjb')
}
}
}
tasks.compileJava.dependsOn xjc