Skip to content

Commit

Permalink
Fix XPP dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
JPercival committed Nov 8, 2023
1 parent ffa2aad commit b8cad21
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 52 deletions.
9 changes: 9 additions & 0 deletions Src/java/buildSrc/src/main/groovy/cql.fhir-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ext {
dependencies {
api platform("ca.uhn.hapi.fhir:hapi-fhir-bom:${hapiVersion}") {
exclude group: 'org.eclipse.jetty'
exclude group: 'xpp3'
}

implementation "ca.uhn.hapi.fhir:org.hl7.fhir.r5:${coreVersion}"
Expand All @@ -23,4 +24,12 @@ dependencies {
implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3"
implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r4"
implementation "ca.uhn.hapi.fhir:hapi-fhir-structures-r5"

// This is to align with the FHIR core dependencies
// Note that this dependency hasn't been updated since 2013
// we probably need to standardize on a fork up the dependency chain
implementation ('org.ogce:xpp3:1.1.6') {
exclude group: 'junit'
exclude group: 'org.hamcrest'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dependencies {
// on Android. But for test purposes we use them pretty much everywhere.
testRuntimeOnly 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.2'
testRuntimeOnly 'org.eclipse.parsson:parsson:1.1.5'
testRuntimeOnly 'xpp3:xpp3:1.1.4c'
}

jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies {
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'

api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
api 'codes.rafael.jaxb2_commons:jaxb2-basics-runtime:3.0.0'
}
Expand Down
1 change: 0 additions & 1 deletion Src/java/cqf-fhir-npm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {
dependencies {
implementation project(':cql-to-elm')
implementation project(':cqf-fhir')
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
implementation 'com.google.code.gson:gson:2.9.1'
implementation 'org.apache.commons:commons-compress:1.24.0'
}
4 changes: 0 additions & 4 deletions Src/java/cql-to-elm-cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ dependencies {
implementation project(':model-jaxb')
implementation project(':elm-jaxb')
implementation 'net.sf.jopt-simple:jopt-simple:4.7'
runtimeOnly 'org.eclipse.persistence:org.eclipse.persistence.moxy:4.0.1'
runtimeOnly 'xpp3:xpp3_min:1.1.4c'
runtimeOnly 'xmlpull:xmlpull:1.1.3.1'

testImplementation project(':model-jaxb')
testImplementation project(':model-jackson')
testImplementation project(':elm-jaxb')
Expand Down
17 changes: 3 additions & 14 deletions Src/java/cql-to-elm/build.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
plugins {
id 'cql.library-conventions'
id 'cql.xjc-conventions'
}

dependencies {
api project(':cql')
api project(':model')
api project(':elm')

// The FHIR ucum service depends on an
// XML pull-parser being present on the classpath, and have a compile-time reference to xpp3.
// However, some platfoms such as Android provide their own pull-parser implementations.
// Additionally, The xpp3.xpp3 dependency includes the javax.xml packagename, which is invalid in
// Java 9+ because split packages (i.e. the same packagename being available in multipe jar) are
// disallowed. For those reasons xpp3 is excluded here, and included as a runtime dependency for
// tests. Users of the CQL translator will need to supply their own implementation or add xpp3
// at runtime.
implementation 'org.fhir:ucum:1.0.8'
implementation 'org.apache.commons:commons-text:1.10.0'
api 'org.fhir:ucum:1.0.8'
api 'org.apache.commons:commons-text:1.10.0'

// TODO: This dependencies are required due the the fact that the CqlTranslatorOptionsMapper lives
// in the cql-to-elm project. Ideally, we'd factor out all serialization depedencies into common
// libraries such that we could swap out jackson for something else. In the meantime, these are
// "implementation" dependencies so that they are not exported downstream.
implementation 'com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:2.15.2'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'


testImplementation project(':elm-jackson')
testImplementation project(':model-jackson')
testImplementation project(':quick')
Expand Down
8 changes: 3 additions & 5 deletions Src/java/elm-fhir/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ ext {
}

dependencies {
implementation project(':cql-to-elm')
implementation project(':engine')
implementation project(":engine-fhir")
implementation "org.mapstruct:mapstruct:${mapstructVersion}"
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
api project(':cql-to-elm')
api project(':engine')
api project(":engine-fhir")

testImplementation project(':quick')
testImplementation "org.reflections:reflections:0.10.2"
Expand Down
2 changes: 0 additions & 2 deletions Src/java/elm-jaxb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ plugins {

dependencies {
api project(':elm')
api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
api 'jakarta.json:jakarta.json-api:2.1.3'
implementation 'org.apache.commons:commons-text:1.10.0'
}
3 changes: 1 addition & 2 deletions Src/java/elm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ plugins {
}

dependencies {
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
implementation project(':model')
api project(':model')
}

generateSources {
Expand Down
4 changes: 0 additions & 4 deletions Src/java/engine-fhir/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ plugins {

dependencies {
api project(':engine')
api 'org.apache.commons:commons-text:1.10.0'
api 'xpp3:xpp3_min:1.1.4c'
api 'xmlpull:xmlpull:1.1.3.1'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.0'
testImplementation project(':cql-to-elm')
testImplementation project(':model-jackson')
Expand Down
6 changes: 2 additions & 4 deletions Src/java/engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ plugins {
}

dependencies {
api 'org.apache.commons:commons-text:1.10.0'
api 'org.fhir:ucum:1.0.8'
implementation project(':elm')
implementation project(':cql-to-elm')
api project(':elm')
api project(':cql-to-elm')

testImplementation project(':model-jackson')
testImplementation project(':elm-jackson')
Expand Down
4 changes: 2 additions & 2 deletions Src/java/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ org.gradle.caching=true
org.gradle.parallel=true

group=info.cqframework
version=3.5.0-SNAPSHOT
version=3.4.1
specification.version=1.5.2
hapi.version=6.8.3
hapi.version=6.8.5
fhir-core.version=6.0.22.2
antlr.version=4.10.1
android.api.level=28
4 changes: 1 addition & 3 deletions Src/java/model-jaxb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ plugins {
}

dependencies {
api 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
api 'jakarta.json:jakarta.json-api:2.1.3'
implementation project(':model')
api project(':model')
}
1 change: 0 additions & 1 deletion Src/java/model/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ plugins {

dependencies {
implementation 'org.apache.commons:commons-text:1.10.0'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
}

generateSources {
Expand Down
5 changes: 2 additions & 3 deletions Src/java/qdm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ plugins {
}

dependencies {
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
implementation project(':elm')
implementation project(':model')
api project(':elm')
api project(':model')
}

generateSources{
Expand Down
5 changes: 2 additions & 3 deletions Src/java/quick/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ plugins {
}

dependencies {
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
implementation project(':elm')
implementation project(':model')
api project(':elm')
api project(':model')
}

generateSources{
Expand Down
4 changes: 2 additions & 2 deletions Src/java/tools/xsd-to-modelinfo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'cql.java-conventions'
id 'cql.library-conventions'
id 'application'
}

Expand All @@ -8,8 +9,7 @@ application {
}

dependencies {
implementation project(':model')
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.1'
api project(':model')
implementation 'net.sf.jopt-simple:jopt-simple:4.7'
implementation 'org.apache.ws.xmlschema:xmlschema-core:2.2.5'
implementation 'org.apache.ws.xmlschema:xmlschema-walker:2.2.5'
Expand Down

0 comments on commit b8cad21

Please sign in to comment.