Skip to content

Commit

Permalink
Merge branch 'master' into master-release
Browse files Browse the repository at this point in the history
  • Loading branch information
ndegwamartin committed Oct 13, 2023
2 parents 658f9c4 + 633b482 commit 6d7f341
Show file tree
Hide file tree
Showing 643 changed files with 294,596 additions and 157,968 deletions.
2 changes: 2 additions & 0 deletions .github/actions/commonSetup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ runs:
- name: "Setup Gradle"
uses: gradle/gradle-build-action@v2
with:
# See https://github.com/marketplace/actions/gradle-build-action#enable-dependency-graph-generation-for-a-workflow
dependency-graph: generate-and-submit
# Limit the size of the cache entry.
# These directories contain instrumented/transformed dependency jars which can be reconstructed relatively quickly.
gradle-home-cache-excludes: |
Expand Down
17 changes: 17 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2

updates:
- package-ecosystem: gradle
directory: /
schedule:
interval: weekly
day: monday
time: "04:00"

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
time: "04:00"
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# Build will compile APK, test APK and run tests, lint, etc.
build:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04-64core

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '32 13 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04-64core
timeout-minutes: 60
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Switch to Java 17 from Eclipse Temurin distro
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

# TODO: use Autobuild instead of ./gradlew after https://github.com/github/codeql-action/issues/1417 is fixed
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2
- name: Build with Gradle
run: ./gradlew --scan --full-stacktrace -Dorg.gradle.dependency.verification=off compileDebugAndroidTestSources

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Android FHIR SDK

[![master](https://github.com/google/android-fhir/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/google/android-fhir/actions/workflows/build.yml) [![master](https://storage.googleapis.com/android-fhir-build-badges/build.svg)](https://storage.googleapis.com/android-fhir-build-badges/build.html) [![codecov](https://codecov.io/gh/google/android-fhir/branch/master/graph/badge.svg?token=PDSC4WRDTQ)](https://codecov.io/gh/google/android-fhir/branch/master) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://chat.fhir.org/#narrow/stream/276344-android)
[![master](https://github.com/google/android-fhir/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/google/android-fhir/actions/workflows/build.yml) [![codecov](https://codecov.io/gh/google/android-fhir/branch/master/graph/badge.svg?token=PDSC4WRDTQ)](https://codecov.io/gh/google/android-fhir/branch/master) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://chat.fhir.org/#narrow/stream/276344-android)

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first
healthcare applications using the [HL7® FHIR® standard](https://www.hl7.org/fhir/) on Android. It
Expand All @@ -15,7 +15,7 @@ The SDK contains the following libraries:
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Data Capture Library | [![Google Maven](https://badgen.net/maven/v/metadata-url/dl.google.com/dl/android/maven2/com/google/android/fhir/data-capture/maven-metadata.xml)](https://maven.google.com/web/index.html?#com.google.android.fhir:data-capture) | [code](https://github.com/google/android-fhir/tree/master/datacapture)| [wiki](https://github.com/google/android-fhir/wiki/Structured-Data-Capture-Library) | Android 7.0 (API level 24) | Collect, validate, and process healthcare data on Android |
| FHIR Engine Library | [![Google Maven](https://badgen.net/maven/v/metadata-url/dl.google.com/dl/android/maven2/com/google/android/fhir/engine/maven-metadata.xml)](https://maven.google.com/web/index.html?#com.google.android.fhir:engine) | [code](https://github.com/google/android-fhir/tree/master/engine) | [wiki](https://github.com/google/android-fhir/wiki/FHIR-Engine-Library) | Android 7.0 (API level 24) | Store and manage FHIR resources locally on Android and synchronize with FHIR server |
| Workflow Library | [![Google Maven](https://badgen.net/maven/v/metadata-url/dl.google.com/dl/android/maven2/com/google/android/fhir/workflow/maven-metadata.xml)](https://maven.google.com/web/index.html?#com.google.android.fhir:workflow) | [code](https://github.com/google/android-fhir/tree/master/workflow) | [wiki](https://github.com/google/android-fhir/wiki/Workflow-Library) | Android 8.0 (API level 26) | Provide decision support and analytics in clinical workflow on Android including implementation of specific FHIR operations ($measure_evaluate and $apply) |
| Workflow Library | [![Google Maven](https://badgen.net/maven/v/metadata-url/dl.google.com/dl/android/maven2/com/google/android/fhir/workflow/maven-metadata.xml)](https://maven.google.com/web/index.html?#com.google.android.fhir:workflow) | [code](https://github.com/google/android-fhir/tree/master/workflow) | [wiki](https://github.com/google/android-fhir/wiki/Workflow-Library) | Android 7.0 (API level 24) | Provide decision support and analytics in clinical workflow on Android including implementation of specific FHIR operations ($measure_evaluate and $apply) |

## Demo apps

Expand All @@ -38,7 +38,7 @@ To contribute to the project, please see [Contributing](https://github.com/googl

You can create a [GitHub issue](https://github.com/google/android-fhir/issues) for bugs and feature requests.

In case you find any security bug, please do NOT create a Github issue. Instead, email us at <android-fhir-sdk-feedback@google.com>.
In case you find any security bug, please do NOT create a GitHub issue. Instead, email us at <android-fhir-sdk-feedback@google.com>.

If you want to provide any feedback or discuss use cases you can:
* email us at <android-fhir-sdk-feedback@google.com>
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ repositories {
dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.21.0")

implementation("com.android.tools.build:gradle:8.1.1")
implementation("com.android.tools.build:gradle:8.1.2")

implementation("app.cash.licensee:licensee-gradle-plugin:1.3.0")
implementation("com.osacky.flank.gradle:fladle:0.17.4")

implementation("com.spotify.ruler:ruler-gradle-plugin:1.2.1")

implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r4:6.0.1")
implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r4:6.8.0")
implementation("com.squareup:kotlinpoet:1.12.0")
}
90 changes: 36 additions & 54 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,6 @@
import org.gradle.api.artifacts.Configuration
import org.gradle.kotlin.dsl.exclude

/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

object Dependencies {

object Androidx {
Expand All @@ -50,22 +34,11 @@ object Dependencies {
}

object Cql {
const val openCdsGroup = "org.opencds.cqf.cql"
const val translatorGroup = "info.cqframework"

const val engine = "$openCdsGroup:engine:${Versions.Cql.engine}"
const val engineJackson = "$openCdsGroup:engine.jackson:${Versions.Cql.engine}"

const val evaluator = "$openCdsGroup:evaluator:${Versions.Cql.evaluator}"
const val evaluatorBuilder = "$openCdsGroup:evaluator.builder:${Versions.Cql.evaluator}"
const val evaluatorDagger = "$openCdsGroup:evaluator.dagger:${Versions.Cql.evaluator}"
const val evaluatorPlanDef = "$openCdsGroup:evaluator.plandefinition:${Versions.Cql.evaluator}"
const val translatorCqlToElm = "$translatorGroup:cql-to-elm:${Versions.Cql.translator}"
const val translatorElm = "$translatorGroup:elm:${Versions.Cql.translator}"
const val translatorModel = "$translatorGroup:model:${Versions.Cql.translator}"

const val translatorElmJackson = "$translatorGroup:elm-jackson:${Versions.Cql.translator}"
const val translatorModelJackson = "$translatorGroup:model-jackson:${Versions.Cql.translator}"
const val evaluator = "org.opencds.cqf.fhir:cqf-fhir-cr:${Versions.Cql.clinicalReasoning}"
const val evaluatorFhirJackson =
"org.opencds.cqf.fhir:cqf-fhir-jackson:${Versions.Cql.clinicalReasoning}"
const val evaluatorFhirUtilities =
"org.opencds.cqf.fhir:cqf-fhir-utility:${Versions.Cql.clinicalReasoning}"
}

object Glide {
Expand Down Expand Up @@ -100,10 +73,7 @@ object Dependencies {
const val fhirCoreConvertors =
"ca.uhn.hapi.fhir:org.hl7.fhir.convertors:${Versions.hapiFhirCore}"

// Runtime dependency that is required to run FhirPath (also requires minSDK of 26).
// Version 3.0 uses java.lang.System.Logger, which is not available on Android
// Replace for Guava when this PR gets merged: https://github.com/hapifhir/hapi-fhir/pull/3977
const val caffeine = "com.github.ben-manes.caffeine:caffeine:${Versions.caffeine}"
const val guavaCaching = "ca.uhn.hapi.fhir:hapi-fhir-caching-guava:${Versions.hapiFhir}"
}

object Jackson {
Expand All @@ -115,7 +85,7 @@ object Dependencies {

const val annotations = "$coreGroup:jackson-annotations:${Versions.jackson}"
const val bom = "$mainGroup:jackson-bom:${Versions.jackson}"
const val core = "$coreGroup:jackson-core:${Versions.jackson}"
const val core = "$coreGroup:jackson-core:${Versions.jacksonCore}"
const val databind = "$coreGroup:jackson-databind:${Versions.jackson}"
const val dataformatXml = "$dataformatGroup:jackson-dataformat-xml:${Versions.jackson}"
const val jaxbAnnotations = "$moduleGroup:jackson-module-jaxb-annotations:${Versions.jackson}"
Expand Down Expand Up @@ -175,6 +145,9 @@ object Dependencies {
"$androidFhirGroup:$androidFhirEngineModule:${Versions.androidFhirEngine}"
const val androidFhirKnowledge = "$androidFhirGroup:knowledge:${Versions.androidFhirKnowledge}"

const val apacheCommonsCompress =
"org.apache.commons:commons-compress:${Versions.apacheCommonsCompress}"

const val desugarJdkLibs = "com.android.tools:desugar_jdk_libs:${Versions.desugarJdkLibs}"
const val fhirUcum = "org.fhir:ucum:${Versions.fhirUcum}"
const val gson = "com.google.code.gson:gson:${Versions.gson}"
Expand Down Expand Up @@ -242,9 +215,7 @@ object Dependencies {
}

object Cql {
const val engine = "2.4.0"
const val evaluator = "2.4.0"
const val translator = "2.4.0"
const val clinicalReasoning = "3.0.0-PRE9-SNAPSHOT"
}

object Glide {
Expand All @@ -256,28 +227,28 @@ object Dependencies {
const val stdlib = "1.8.20"
}

const val androidFhirCommon = "0.1.0-alpha04"
const val androidFhirEngine = "0.1.0-beta03"
const val androidFhirCommon = "0.1.0-alpha05"
const val androidFhirEngine = "0.1.0-beta04"
const val androidFhirKnowledge = "0.1.0-alpha01"
const val apacheCommonsCompress = "1.21"
const val desugarJdkLibs = "2.0.3"
const val caffeine = "2.9.1"
const val fhirUcum = "1.0.3"
const val gson = "2.9.1"
const val guava = "28.2-android"

// Hapi FHIR and HL7 Core Components are interlinked.
// 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"
const val guava = "32.1.2-android"

// 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"
const val hapiFhir = "6.8.0"
const val hapiFhirCore = "6.0.22"

const val http = "4.11.0"
// Maximum version that supports Android API Level 24:

// Maximum Jackson libraries (excluding core) version that supports Android API Level 24:
// https://github.com/FasterXML/jackson-databind/issues/3658
const val jackson = "2.13.5"

// Maximum Jackson Core library version that supports Android API Level 24:
const val jacksonCore = "2.15.2"

const val jsonToolsPatch = "1.13"
const val jsonAssert = "1.5.1"
const val material = "1.9.0"
Expand Down Expand Up @@ -321,15 +292,26 @@ object Dependencies {
exclude(module = "javax.json")
exclude(module = "jcl-over-slf4j")
exclude(group = "org.apache.httpcomponents")
exclude(group = "org.antlr", module = "antlr4")
exclude(group = "org.eclipse.persistence", module = "org.eclipse.persistence.moxy")
}

fun Configuration.forceGuava() {
// Removes caffeine
exclude(module = "hapi-fhir-caching-caffeine")
exclude(group = "com.github.ben-manes.caffeine", module = "caffeine")

resolutionStrategy {
force(guava)
force(HapiFhir.guavaCaching)
}
}

fun Configuration.forceHapiVersion() {
// Removes newer versions of caffeine and manually imports 2.9
// Removes newer versions of hapi and keeps on 6.0.1
// (newer versions don't work on Android)
resolutionStrategy {
force(HapiFhir.caffeine)

force(HapiFhir.fhirBase)
force(HapiFhir.fhirClient)
force(HapiFhir.fhirCoreConvertors)
Expand Down
31 changes: 15 additions & 16 deletions buildSrc/src/main/kotlin/FirebaseTestLabConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,23 @@ fun Project.configureFirebaseTestLabForLibraries() {
mapOf(
"coverage" to "true",
"coverageFilePath" to "/sdcard/Download/",
"clearPackageData" to "true"
)
"clearPackageData" to "true",
),
)
flakyTestAttempts.set(3)
devices.set(
listOf(
mapOf(
"model" to "Nexus6P",
"version" to
"${project.extensions.getByType(LibraryExtension::class.java).defaultConfig.minSdk}",
"locale" to "en_US"
"locale" to "en_US",
),
mapOf(
"model" to "panther",
"model" to "MediumPhone.arm",
"version" to "${project.extensions.getByType(LibraryExtension::class.java).compileSdk}",
"locale" to "en_US"
"locale" to "en_US",
),
)
),
)
}
}
Expand All @@ -61,19 +60,17 @@ fun Project.configureFirebaseTestLabForMicroBenchmark() {
mapOf(
"additionalTestOutputDir" to "/sdcard/Download",
"no-isolated-storage" to "true",
"clearPackageData" to "true"
)
"clearPackageData" to "true",
),
)
// some of the benchmark tests get timed-out in the default 15m
testTimeout.set("45m")
devices.set(
listOf(
mapOf(
"model" to "panther",
"version" to "${project.extensions.getByType(LibraryExtension::class.java).compileSdk}",
"locale" to "en_US"
"locale" to "en_US",
),
)
),
)
}
}
Expand All @@ -83,17 +80,19 @@ private fun FlankGradleExtension.commonConfigurationForFirebaseTestLab(project:
debugApk.set(
project.provider {
"${project.rootDir}/demo/build/outputs/apk/androidTest/debug/demo-debug-androidTest.apk"
}
},
)
useOrchestrator.set(true)
maxTestShards.set(20)
flakyTestAttempts.set(1)
maxTestShards.set(10)
testTimeout.set("45m")
directoriesToPull.set(listOf("/sdcard/Download"))
resultsBucket.set("android-fhir-build-artifacts")
resultsDir.set(
if (project.providers.environmentVariable("KOKORO_BUILD_ARTIFACTS_SUBDIR").isPresent) {
"${System.getenv("KOKORO_BUILD_ARTIFACTS_SUBDIR")}/firebase/${project.name}"
} else {
"${project.name}-${UUID.randomUUID()}"
}
},
)
}
Loading

0 comments on commit 6d7f341

Please sign in to comment.