Skip to content

Commit bef1830

Browse files
authored
Merge branch 'master' into rm/review-layout-catalog-app
2 parents 56affc8 + 7d239e8 commit bef1830

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1493
-37
lines changed

.github/actions/commonSetup/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ description: "Prepares the machine"
33
runs:
44
using: "composite"
55
steps:
6-
- name: Set up JDK 17
7-
uses: actions/setup-java@v2
6+
- name: Set up JDK 21
7+
uses: actions/setup-java@v4
88
with:
99
distribution: temurin
10-
java-version: "17"
10+
java-version: "21"
1111

1212
- name: "Setup Gradle"
1313
uses: gradle/gradle-build-action@v2

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
# Build will compile APK, test APK and run tests, lint, etc.
4646
build:
4747
runs-on: 'ubuntu-24.04-8core'
48-
timeout-minutes: 60
48+
timeout-minutes: 90
4949
permissions:
5050
actions: read
5151
contents: read

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ site/
9494
# (which is slightly confusing, but helps mkdocs to validate links)
9595
# so we ignore that here, as it's a built artifact that should not be committed
9696
docs/use/api/*/**
97+
98+
# Kotlin 2.0
99+
.kotlin/

build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ buildscript {
1313
classpath(Plugins.kotlinGradlePlugin)
1414
classpath(Plugins.navSafeArgsGradlePlugin)
1515
classpath(Plugins.rulerGradlePlugin)
16+
classpath(Plugins.kotlinComposePlugin)
17+
classpath(Plugins.kotlinSerializationPlugin)
1618
}
1719
}
1820

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111
dependencies {
1212
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.22.0")
1313

14-
implementation("com.android.tools.build:gradle:8.5.0")
14+
implementation("com.android.tools.build:gradle:8.9.2")
1515

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

buildSrc/src/main/kotlin/FirebaseTestLabConfig.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Google LLC
2+
* Copyright 2023-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@ fun Project.configureFirebaseTestLabForLibraries() {
4343
),
4444
mapOf(
4545
"model" to "MediumPhone.arm",
46-
"version" to "${project.extensions.getByType(LibraryExtension::class.java).compileSdk}",
46+
"version" to "33",
4747
"locale" to "en_US",
4848
),
4949
),
@@ -67,7 +67,7 @@ fun Project.configureFirebaseTestLabForMicroBenchmark() {
6767
listOf(
6868
mapOf(
6969
"model" to "panther",
70-
"version" to "${project.extensions.getByType(LibraryExtension::class.java).compileSdk}",
70+
"version" to "33",
7171
"locale" to "en_US",
7272
),
7373
),

buildSrc/src/main/kotlin/Plugins.kt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 Google LLC
2+
* Copyright 2023-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,9 @@ object Plugins {
2323
const val dokka = "org.jetbrains.dokka"
2424
const val kotlin = "kotlin"
2525
const val kotlinAndroid = "kotlin-android"
26+
const val kotlinCompose = "org.jetbrains.kotlin.plugin.compose"
2627
const val kotlinKsp = "com.google.devtools.ksp"
28+
const val kotlinSerialization = "org.jetbrains.kotlin.plugin.serialization"
2729
const val mavenPublish = "maven-publish"
2830
const val fladle = "com.osacky.fladle"
2931
const val navSafeArgs = "androidx.navigation.safeargs.kotlin"
@@ -35,17 +37,22 @@ object Plugins {
3537
const val androidGradlePlugin = "com.android.tools.build:gradle:${Versions.androidGradlePlugin}"
3638
const val benchmarkGradlePlugin =
3739
"androidx.benchmark:benchmark-gradle-plugin:${Versions.benchmarkPlugin}"
38-
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22"
40+
const val kotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.kotlin}"
41+
const val kotlinComposePlugin =
42+
"org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin:${Versions.kotlin}"
43+
const val kotlinSerializationPlugin =
44+
"org.jetbrains.kotlin.plugin.serialization:org.jetbrains.kotlin.plugin.serialization.gradle.plugin:${Versions.kotlin}"
3945
const val navSafeArgsGradlePlugin = "androidx.navigation:navigation-safe-args-gradle-plugin:2.6.0"
4046
const val rulerGradlePlugin = "com.spotify.ruler:ruler-gradle-plugin:1.2.1"
4147
const val flankGradlePlugin = "com.osacky.flank.gradle:fladle:0.17.4"
4248
const val kspGradlePlugin =
4349
"com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:${Versions.kspPlugin}"
4450

4551
object Versions {
46-
const val androidGradlePlugin = "8.5.0"
52+
const val androidGradlePlugin = "8.9.2"
4753
const val benchmarkPlugin = "1.1.0"
4854
const val dokka = "1.9.20"
49-
const val kspPlugin = "1.9.22-1.0.18"
55+
const val kspPlugin = "2.1.20-2.0.1"
56+
const val kotlin = "2.1.20"
5057
}
5158
}

buildSrc/src/main/kotlin/Sdk.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 Google LLC
2+
* Copyright 2023-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,8 +15,8 @@
1515
*/
1616

1717
object Sdk {
18-
const val COMPILE_SDK = 33
19-
const val TARGET_SDK = 31
18+
const val COMPILE_SDK = 36
19+
const val TARGET_SDK = 33
2020

2121
// Engine and SDC must support API 24.
2222
// Remove desugaring when upgrading it to 26.

demo/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ dependencies {
5050
implementation(libs.androidx.datastore.preferences)
5151
implementation(libs.androidx.fragment)
5252
implementation(libs.androidx.lifecycle.livedata)
53-
implementation(libs.androidx.lifecycle.runtime)
53+
implementation(libs.androidx.lifecycle.runtime.ktx)
5454
implementation(libs.androidx.lifecycle.viewmodel)
5555
implementation(libs.androidx.navigation.fragment)
5656
implementation(libs.androidx.navigation.ui)

engine/benchmarks/app/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/build
2+
/src/main/assets/bulk_data/*
3+
!*.keep
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
plugins {
2+
id(Plugins.BuildPlugins.application)
3+
id(Plugins.BuildPlugins.kotlinAndroid)
4+
id(Plugins.BuildPlugins.kotlinCompose)
5+
id(Plugins.BuildPlugins.kotlinSerialization)
6+
}
7+
8+
android {
9+
namespace = "com.google.android.fhir.engine.benchmarks.app"
10+
compileSdk = Sdk.COMPILE_SDK
11+
12+
defaultConfig {
13+
applicationId = "com.google.android.fhir.engine.benchmarks.app"
14+
minSdk = Sdk.MIN_SDK
15+
targetSdk = Sdk.TARGET_SDK
16+
versionCode = 1
17+
versionName = "1.0"
18+
19+
testInstrumentationRunner = Dependencies.androidJunitRunner
20+
}
21+
22+
buildTypes {
23+
release {
24+
isMinifyEnabled = false
25+
proguardFiles(
26+
getDefaultProguardFile("proguard-android-optimize.txt"),
27+
"proguard-rules.pro",
28+
)
29+
}
30+
31+
create("benchmark") {
32+
initWith(buildTypes.getByName("release"))
33+
signingConfig = signingConfigs.getByName("debug")
34+
matchingFallbacks += listOf("release")
35+
isDebuggable = false
36+
}
37+
}
38+
compileOptions {
39+
isCoreLibraryDesugaringEnabled = true
40+
sourceCompatibility = JavaVersion.VERSION_11
41+
targetCompatibility = JavaVersion.VERSION_11
42+
}
43+
kotlinOptions { jvmTarget = "11" }
44+
buildFeatures { compose = true }
45+
46+
packaging { resources.excludes.addAll(listOf("META-INF/ASL-2.0.txt", "META-INF/LGPL-3.0.txt")) }
47+
48+
kotlin { jvmToolchain(11) }
49+
}
50+
51+
dependencies {
52+
coreLibraryDesugaring(Dependencies.desugarJdkLibs)
53+
implementation(project(":engine"))
54+
55+
implementation(libs.androidx.core)
56+
implementation(libs.androidx.lifecycle.viewmodel.savedstate)
57+
implementation(libs.androidx.activity.compose)
58+
implementation(platform(libs.androidx.compose.bom))
59+
implementation(libs.androidx.compose.ui)
60+
implementation(libs.androidx.compose.ui.graphics)
61+
implementation(libs.androidx.compose.ui.tooling.preview)
62+
implementation(libs.androidx.compose.material3)
63+
implementation(libs.androidx.navigation.compose)
64+
implementation(libs.bundles.androidx.tracing)
65+
implementation(libs.kotlinx.serialization.json)
66+
67+
testImplementation(libs.junit)
68+
androidTestImplementation(libs.androidx.test.ext.junit)
69+
androidTestImplementation(libs.androidx.test.espresso.core)
70+
androidTestImplementation(platform(libs.androidx.compose.bom))
71+
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
72+
debugImplementation(libs.androidx.compose.ui.tooling)
73+
debugImplementation(libs.androidx.compose.ui.test.manifest)
74+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<manifest
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
>
6+
7+
<uses-permission android:name="android.permission.INTERNET" />
8+
9+
<application
10+
android:name=".MainApplication"
11+
android:allowBackup="true"
12+
android:icon="@mipmap/ic_launcher"
13+
android:label="@string/app_name"
14+
android:networkSecurityConfig="@xml/network_security_config"
15+
android:roundIcon="@mipmap/ic_launcher_round"
16+
android:supportsRtl="true"
17+
android:theme="@style/Theme.Androidfhir"
18+
>
19+
20+
<profileable android:shell="true" tools:targetApi="29" />
21+
22+
<activity
23+
android:name=".MainActivity"
24+
android:exported="true"
25+
android:theme="@style/Theme.Androidfhir"
26+
>
27+
<intent-filter>
28+
<action android:name="android.intent.action.MAIN" />
29+
30+
<category android:name="android.intent.category.LAUNCHER" />
31+
</intent-filter>
32+
</activity>
33+
</application>
34+
35+
</manifest>

engine/benchmarks/app/src/main/assets/bulk_data/.keep

Whitespace-only changes.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.android.fhir.engine.benchmarks.app
18+
19+
import androidx.lifecycle.ViewModel
20+
import androidx.lifecycle.viewModelScope
21+
import com.google.android.fhir.FhirEngine
22+
import com.google.android.fhir.engine.benchmarks.app.data.ResourcesDataProvider
23+
import java.time.LocalDateTime
24+
import kotlinx.coroutines.flow.MutableStateFlow
25+
import kotlinx.coroutines.flow.StateFlow
26+
import kotlinx.coroutines.flow.asStateFlow
27+
import kotlinx.coroutines.launch
28+
29+
@Suppress("unused")
30+
class CrudApiViewModel(
31+
private val resourcesDataProvider: ResourcesDataProvider,
32+
private val fhirEngine: FhirEngine,
33+
) : ViewModel() {
34+
private val _detailMutableStateFlow = MutableStateFlow("")
35+
val detailStateFlow: StateFlow<String> = _detailMutableStateFlow.asStateFlow()
36+
37+
init {
38+
viewModelScope.launch(benchmarkingViewModelWorkDispatcher) {
39+
_detailMutableStateFlow.value = "CRUD: ${LocalDateTime.now()}"
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)