forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xjc.gradle
34 lines (29 loc) · 1.43 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
configurations {
xjc
}
dependencies {
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/net/sf/jabref/logic/importer/fileformat/medline"
outputs.dir "src/main/gen/net/sf/jabref/logic/importer/fileformat/bibtexml"
outputs.dir "src/main/gen/net/sf/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: 'net.sf.jabref.logic.importer.fileformat.medline') {
schema(dir: 'src/main/resources/xjc/medline', includes: 'medline.xsd')
}
ant.xjc(destdir: 'src/main/gen/', package: 'net.sf.jabref.logic.importer.fileformat.bibtexml') {
schema(dir: 'src/main/resources/xjc/bibtexml', includes: 'bibtexml.xsd')
}
ant.xjc(destdir: 'src/main/gen/', package: 'net.sf.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