-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
774 additions
and
3 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
55 changes: 55 additions & 0 deletions
55
Src/java/buildSrc/src/main/groovy/cql.xjc-temp-conventions.gradle
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
configurations { | ||
xjc | ||
} | ||
|
||
dependencies { | ||
xjc 'codes.rafael.jaxb2_commons:jaxb2-basics-ant:3.0.0' | ||
xjc 'codes.rafael.jaxb2_commons:jaxb2-basics:3.0.0' | ||
xjc 'codes.rafael.jaxb2_commons:jaxb2-fluent-api:3.0.0' | ||
// Eclipse has taken over all Java EE reference components | ||
// https://www.infoworld.com/article/3310042/eclipse-takes-over-all-java-ee-reference-components.html | ||
// https://wiki.eclipse.org/Jakarta_EE_Maven_Coordinates | ||
xjc 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' | ||
xjc 'org.glassfish.jaxb:jaxb-xjc:3.0.2' | ||
xjc 'org.glassfish.jaxb:jaxb-runtime:4.0.3' | ||
xjc 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2' | ||
xjc 'org.slf4j:slf4j-simple:1.7.36' | ||
} | ||
|
||
ext.xjc = [ | ||
destDir: "${buildDir}/generated/sources/$name-xjc-temp/main/java", | ||
args: '-disableXmlSecurity -Xfluent-api -Xequals -XhashCode -XtoString -Xsetters -Xsetters-mode=direct' | ||
] | ||
|
||
|
||
task generateSources { | ||
|
||
outputs.dir xjc.destDir | ||
|
||
doLast { | ||
file(xjc.destDir).mkdirs() | ||
|
||
ant.taskdef(name: 'xjc', classname: 'org.jvnet.jaxb2_commons.xjc.XJC2Task', classpath: configurations.xjc.asPath) | ||
|
||
/* The above sets up the task, but the real work of the task should be specified in the subproject using | ||
generateSources.doLast. For example: | ||
generateSources.doLast { | ||
ant.xjc(destdir: xjc.destDir, schema: "${projectDir}/path/to/file.xsd") { | ||
arg(line: xjc.args) | ||
} | ||
} | ||
*/ | ||
} | ||
} | ||
|
||
compileJava { | ||
dependsOn generateSources | ||
} | ||
|
||
clean { | ||
delete xjc.destDir | ||
} |
39 changes: 39 additions & 0 deletions
39
Src/java/buildSrc/src/main/groovy/cql.xsd-java-gen-conventions.gradle
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
plugins { | ||
id "com.github.node-gradle.node" | ||
} | ||
|
||
dependencies { | ||
api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1' | ||
api 'codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0' | ||
} | ||
|
||
node { | ||
nodeProjectDir = file('../../js/xsd-java-gen') | ||
} | ||
|
||
var outDir = "${buildDir}/generated/sources/$name/main/java" | ||
|
||
task runXsdJavaGen(type: NodeTask) { | ||
dependsOn npmInstall | ||
script = file('../../js/xsd-java-gen/generate.js') | ||
} | ||
|
||
compileJava { | ||
dependsOn runXsdJavaGen | ||
} | ||
|
||
sourcesJar { | ||
dependsOn runXsdJavaGen | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java { | ||
srcDir(outDir) | ||
} | ||
} | ||
} | ||
|
||
clean { | ||
delete outDir | ||
} |
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
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
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
Oops, something went wrong.