-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
define xjc input/ouput dir (subsequent builds will be faster) (#1628)
Execute task only when input/output dir changed.
- Loading branch information
1 parent
0853734
commit 653c8a9
Showing
1 changed file
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
|
||
configurations { | ||
xjc | ||
} | ||
xjc | ||
} | ||
|
||
dependencies { | ||
xjc group: 'com.sun.xml.bind', name: 'jaxb-xjc', version: '2.2.4-1' | ||
xjc 'com.sun.xml.bind:jaxb-xjc:2.2.4-1' | ||
} | ||
|
||
task xjc () << { | ||
ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.xjc.asPath) | ||
|
||
ant.xjc(destdir: 'src/main/gen/', package: 'net.sf.jabref.importer.fileformat.medline'){ | ||
schema(dir: 'src/main/resources/xjc/medline', includes: 'medline.xsd') | ||
} | ||
task xjc { | ||
inputs.dir "src/main/resources/xjc/medline/" | ||
outputs.dir "src/main/gen/net/sf/jabref/importer/fileformat/medline" | ||
|
||
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.importer.fileformat.medline') { | ||
schema(dir: 'src/main/resources/xjc/medline', includes: 'medline.xsd') | ||
} | ||
} | ||
} | ||
|
||
tasks. compileJava.dependsOn xjc | ||
tasks.compileJava.dependsOn xjc |