Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0d220f0
Migrate catalog app to Kotlin Multiplatform
ellykits Feb 2, 2026
14905d0
Merge branch 'master' into catalog-kmp-migration
ellykits Feb 2, 2026
b0a950a
Fix minor UI issues on catalog and support overriding view with custo…
ellykits Feb 4, 2026
919834d
Fix padding and color issues on questionnaire UI
ellykits Feb 4, 2026
a9e8dc5
Merge branch 'master' into catalog-kmp-migration
ellykits Feb 11, 2026
f7d11cc
Merge branch 'master' into catalog-kmp-migration
ellykits Feb 12, 2026
f971938
Merge branch 'master' into catalog-kmp-migration
ellykits Feb 13, 2026
79eb175
Implement error state bottom sheet and submit confirmation dialog
ellykits Feb 13, 2026
2561b66
Redesign error state components
ellykits Feb 17, 2026
eede199
Merge branch 'master' into catalog-kmp-migration
ellykits Feb 17, 2026
ab7b3d0
Merge branch 'master' into catalog-kmp-migration
ellykits Feb 24, 2026
beea8da
Merge branch 'master' into catalog-kmp-migration
ellykits Feb 24, 2026
0fb221a
Fix expression evaluation
ellykits Feb 25, 2026
33327c1
Refactore implementation for setting context variables for fhirpath
ellykits Feb 27, 2026
b86ca22
Implement FhirPathService utility object
ellykits Mar 2, 2026
5f450dd
Clean up unused code
ellykits Mar 3, 2026
25c93bd
KMP datacapture fixes (WIP) (#9)
LZRS Mar 3, 2026
8e79566
Cleanup unused Android resources
ellykits Mar 9, 2026
ef36005
Merge branch 'catalog-kmp-migration' of github.com:ellykits/android-f…
ellykits Mar 9, 2026
49b5584
Move info card placement to bottom (#12)
LZRS Mar 9, 2026
840b333
Fix validation for group paginated questionnaires (#10)
LZRS Mar 9, 2026
e9b2217
Set catalog app theme to app compats no actionbar theme
ellykits Mar 9, 2026
bfd96a0
Add catalog-iosApp module
ellykits Mar 9, 2026
f26f113
Fix text not showing in QuestionnaireResponse.Item (#13)
LZRS Mar 9, 2026
da8edab
Delete unused dependencies
ellykits Mar 10, 2026
2e09858
Reinstate required dependencies
ellykits Mar 10, 2026
679e310
Skip wasmJS build for catalog in CI (#14)
LZRS Mar 18, 2026
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
108 changes: 77 additions & 31 deletions catalog/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
id("org.jetbrains.kotlin.multiplatform")
id("com.android.application")
id("org.jetbrains.kotlin.plugin.compose")
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.serialization")
alias(libs.plugins.androidx.navigation.safeargs)
}

configureRuler()
// configureRuler()

android {
namespace = "com.google.android.fhir.catalog"
compileSdk = Sdk.COMPILE_SDK

defaultConfig {
applicationId = Releases.Catalog.applicationId
minSdk = Sdk.MIN_SDK
Expand All @@ -17,47 +24,86 @@ android {
versionName = Releases.Catalog.versionName
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures { viewBinding = true }

buildTypes {
release {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
compileOptions {
// Flag to enable support for the new language APIs
// See https://developer.android.com/studio/write/java8-support
isCoreLibraryDesugaringEnabled = true
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

packaging {
resources.excludes.addAll(
listOf("META-INF/ASL2.0", "META-INF/ASL-2.0.txt", "META-INF/LGPL-3.0.txt"),
)
}
kotlin { jvmToolchain(11) }
}

dependencies {
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.ext.junit)

coreLibraryDesugaring(libs.desugar.jdk.libs)

implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.core)
implementation(libs.androidx.fragment)
implementation(libs.androidx.navigation.fragment)
implementation(libs.androidx.navigation.ui)
implementation(libs.kotlin.stdlib)
implementation(libs.material)
implementation(project(path = ":contrib:barcode"))
implementation(project(path = ":contrib:locationwidget"))
implementation(project(path = ":datacapture"))
implementation(project(path = ":engine"))

testImplementation(libs.junit)
kotlin {
androidTarget {
compilerOptions { jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11) }
}

jvm("desktop")

@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser {
val rootProjectDir = rootProject.projectDir.path
commonWebpackConfig {
devServer =
(devServer ?: KotlinWebpackConfig.DevServer()).copy(
static = (devServer?.static ?: mutableListOf()).apply { add(rootProjectDir) },
)
}
}
binaries.executable()
}

listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64(),
)
.forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "CatalogKit"
isStatic = true
}
}

sourceSets {
androidMain.dependencies {
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.core)
implementation(libs.androidx.fragment)
implementation(libs.material)
// TODO restore after these libraries are migrated to Kotlin Multiplatform
// implementation(project(":engine"))
// implementation(project(":contrib:barcode"))
// implementation(project(":contrib:locationwidget"))
}
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
implementation(libs.androidx.lifecycle.viewmodel.compose)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.material.icons.extended)
implementation(libs.kermit)
implementation(libs.kotlin.fhir)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.navigation.compose)
implementation(project(":datacapture-kmp"))
}

val desktopMain by getting { dependencies { implementation(compose.desktop.currentOs) } }
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 Google LLC
* Copyright 2022-2026 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 All @@ -17,15 +17,11 @@
package com.google.android.fhir.catalog

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.SavedStateHandle
import ca.uhn.fhir.context.FhirContext
import ca.uhn.fhir.context.FhirVersionEnum
import org.hl7.fhir.r4.model.QuestionnaireResponse

class DemoQuestionnaireViewModel(application: Application, private val state: SavedStateHandle) :
AndroidViewModel(application) {
class CatalogApplication : Application() {

fun getQuestionnaireResponseJson(response: QuestionnaireResponse) =
FhirContext.forCached(FhirVersionEnum.R4).newJsonParser().encodeResourceToString(response)
override fun onCreate() {
super.onCreate()
// TODO Restore QueryResolver for DataCaptureConfigu once FHIR Engine is migrated to KMP
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2021-2026 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.
*/

package com.google.android.fhir.catalog

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent { App() }
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<adaptive-icon
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
tools:ignore="MonochromeLauncherIcon"
>
<background android:drawable="@color/ic_card_file_box_background" />
<foreground android:drawable="@mipmap/ic_card_file_box_foreground" />
</adaptive-icon>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,38 @@
limitations under the License.
-->
<resources>
<color name="primary_blue_80">#A8C7FA</color>
<color name="ic_card_file_box_background">#3B5CFF</color>
<color name="onPrimary_blue_20">#062E6F</color>
<color name="primaryContainer_blue_30">#0842A0</color>
<color name="onPrimaryContainer_blue_90">#D3E3FD</color>

<color name="secondary_blue_80">#7FCFFF</color>
<color name="onSecondary_blue_20">#003355</color>
<color name="secondaryContainer_blue_30">#004A77</color>
<color name="onSecondaryContainer_blue_90">#C2E7FF</color>

<color name="tertiary_green_80">#91D5A3</color>
<color name="onTertiary_green_20">#0A3818</color>
<color name="tertiaryContainer_green_30">#0F5223</color>
<color name="onTertiaryContainer_green_90">#C4EED0</color>

<color name="error_red_80">#F2B8B5</color>
<color name="errorContainer_red_20">#601410</color>
<color name="onError_red_30">#8C1D18</color>
<color name="onErrorContainer_red_90">#F9DEDC</color>

<color name="background_neutral_10">#1F1F1F</color>
<color name="onBackground_neutral_90">#E3E3E3</color>

<color name="surface_neutral_10">#1F1F1F</color>
<color name="onSurface_neutral_90">#E3E3E3</color>

<color name="surfaceVariant_neutral_variant_30">#444746</color>
<color name="onSurfaceVariant_neutral_variant_80">#C4C7C5</color>

<color name="outline_neutral_variant_60">#8E918F</color>

<color name="custom_style_primary_100">#000000</color>
<color name="custom_style_primary_200">#0C0A20</color>
<color name="custom_style_primary_300">#201441</color>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
<!--
Copyright 2020 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.
-->
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style
Expand Down
Loading
Loading