Skip to content

Commit

Permalink
create xsd target direction
Browse files Browse the repository at this point in the history
  • Loading branch information
tschechlovdev committed Jul 3, 2016
1 parent 7add4ae commit 3b25f13
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,20 @@ dependencies {
xjc group: 'com.sun.xml.bind', name: 'jaxb-xjc', version: '2.2.4-1'
}

def schemaTargetDir = new File ('src/main/gen')

task createDirs () {
schemaTargetDir.mkdirs()
}

task xjc () {
task xjc () {
ant.taskdef(name: 'xjc', classname: 'com.sun.tools.xjc.XJCTask', classpath: configurations.xjc.asPath)

ant.xjc(
destdir: 'src/main/gen',
destdir: schemaTargetDir,
schema: 'src/main/resources/xjc/medline.xsd'
)
}

compileJava.dependsOn xjc
xjc.dependsOn createDirs
compileJava.dependsOn xjc

0 comments on commit 3b25f13

Please sign in to comment.