Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix engine and knowledge library versions in workflow and testing #2085

Merged
merged 14 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions benchmark/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ dependencies {
androidTestImplementation(Dependencies.Retrofit.coreRetrofit)

androidTestImplementation(project(":engine"))
androidTestImplementation(project(":knowledge"))
androidTestImplementation(project(":workflow"))
androidTestImplementation(project(":knowledge")) {
exclude(group = Dependencies.androidFhirGroup, module = Dependencies.androidFhirEngineModule)
}
androidTestImplementation(project(":workflow")) {
exclude(group = Dependencies.androidFhirGroup, module = Dependencies.androidFhirEngineModule)
exclude(group = Dependencies.androidFhirGroup, module = Dependencies.androidFhirKnowledgeModule)
}
androidTestImplementation(project(":workflow-testing"))
}
10 changes: 8 additions & 2 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,12 @@ object Dependencies {
}

const val androidFhirGroup = "com.google.android.fhir"
const val androidFhirCommon = "$androidFhirGroup:common:${Versions.androidFhirCommon}"
const val androidFhirEngineModule = "engine"
const val androidFhirKnowledgeModule = "knowledge"
const val androidFhirCommon = "$androidFhirGroup:common:${Versions.androidFhirCommon}"
const val androidFhirEngine =
"$androidFhirGroup:$androidFhirEngineModule:${Versions.androidFhirEngine}"
const val androidFhirKnowledge = "$androidFhirGroup:knowledge:${Versions.androidFhirKnowledge}"

const val desugarJdkLibs = "com.android.tools:desugar_jdk_libs:${Versions.desugarJdkLibs}"
const val fhirUcum = "org.fhir:ucum:${Versions.fhirUcum}"
Expand Down Expand Up @@ -211,13 +213,15 @@ object Dependencies {

const val androidBenchmarkRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner"
const val androidJunitRunner = "androidx.test.runner.AndroidJUnitRunner"

// Makes Json assertions where the order of elements, tabs/whitespaces are not important.
const val jsonAssert = "org.skyscreamer:jsonassert:${Versions.jsonAssert}"
const val junit = "junit:junit:${Versions.junit}"
const val mockitoKotlin = "org.mockito.kotlin:mockito-kotlin:${Versions.mockitoKotlin}"
const val mockitoInline = "org.mockito:mockito-inline:${Versions.mockitoInline}"
const val robolectric = "org.robolectric:robolectric:${Versions.robolectric}"
const val truth = "com.google.truth:truth:${Versions.truth}"

// Makes XML assertions where the order of elements, tabs/whitespaces are not important.
const val xmlUnit = "org.xmlunit:xmlunit-core:${Versions.xmlUnit}"

Expand Down Expand Up @@ -253,7 +257,8 @@ object Dependencies {
}

const val androidFhirCommon = "0.1.0-alpha04"
const val androidFhirEngine = "0.1.0-beta02"
const val androidFhirEngine = "0.1.0-beta03"
const val androidFhirKnowledge = "0.1.0-alpha01"
const val desugarJdkLibs = "2.0.3"
const val caffeine = "2.9.1"
const val fhirUcum = "1.0.3"
Expand All @@ -264,6 +269,7 @@ object Dependencies {
// Newer versions of HapiFhir don't work on Android due to the use of Caffeine 3+
// Wait for this to release (6.3): https://github.com/hapifhir/hapi-fhir/pull/4196
const val hapiFhir = "6.0.1"

// Newer versions don't work on Android due to Apache Commons Codec:
// Wait for this fix: https://github.com/hapifhir/org.hl7.fhir.core/issues/1046
const val hapiFhirCore = "5.6.36"
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/src/main/kotlin/LicenseeConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ fun Project.configureLicensee() {
}

// SQLCipher
allowDependency("net.zetetic", "android-database-sqlcipher", "4.5.0") {
because("Custom license, essentially BSD-3. https://www.zetetic.net/sqlcipher/license/")
}
allowDependency("net.zetetic", "android-database-sqlcipher", "4.5.4") {
because("Custom license, essentially BSD-3. https://www.zetetic.net/sqlcipher/license/")
}
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/Releases.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ object Releases {
const val groupId = "com.google.android.fhir"

// Libraries
// After releasing a new version of a library, you will need to bump up the library version
// in Dependencies.kt (in a separate PR)

object Common : LibraryArtifact {
override val artifactId = "common"
Expand Down
2 changes: 1 addition & 1 deletion testing/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
}

dependencies {
api(project(":engine"))
api(Dependencies.androidFhirEngine)
divyaramnath-13 marked this conversation as resolved.
Show resolved Hide resolved

implementation(Dependencies.AndroidxTest.rules)
}
4 changes: 2 additions & 2 deletions workflow/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ dependencies {
implementation(Dependencies.Kotlin.kotlinCoroutinesCore)
implementation(Dependencies.Kotlin.stdlib)
implementation(Dependencies.xerces)
implementation(project(":engine"))
implementation(project(":knowledge"))
implementation(Dependencies.androidFhirEngine) { exclude(module = "truth") }
implementation(Dependencies.androidFhirKnowledge)

testImplementation(Dependencies.AndroidxTest.core)
testImplementation(Dependencies.jsonAssert)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 Google LLC
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -148,7 +148,7 @@ class FhirOperatorTest {

assertEquals(
readResourceAsString("/plan-definition/cql-applicability-condition/care_plan.json"),
jsonParser.encodeResourceToString(carePlan),
jsonParser.setPrettyPrint(true).encodeResourceToString(carePlan),
true
)
}
Expand Down