Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@ class AndroidRoomConventionPlugin : Plugin<Project> {
}

pluginManager.withPlugin("org.jetbrains.kotlin.android") {
val hasAndroidTest = projectDir.resolve("src/androidTest").exists()
dependencies {
"implementation"(roomRuntime)
"ksp"(roomCompiler)
"androidTestImplementation"(roomTesting)
if (hasAndroidTest) {
"androidTestImplementation"(roomTesting)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ internal fun Project.configureAndroidCompose(
buildFeatures.compose = true
}

val hasAndroidTest = project.projectDir.resolve("src/androidTest").exists()
dependencies {
val bom = libs.library("androidx-compose-bom")
"implementation"(platform(bom))
"androidTestImplementation"(platform(bom))
if (hasAndroidTest) {
"androidTestImplementation"(platform(bom))
}
"implementation"(libs.library("androidx-compose-ui-tooling"))
"implementation"(libs.library("androidx-compose-runtime"))
"runtimeOnly"(libs.library("androidx-compose-runtime-tracing"))
Expand All @@ -44,7 +47,9 @@ internal fun Project.configureAndroidCompose(
"implementation"(libs.library("compose-multiplatform-resources"))

// Add Espresso explicitly to avoid version mismatch issues on newer Android versions
"androidTestImplementation"(libs.library("androidx-test-espresso-core"))
if (hasAndroidTest) {
"androidTestImplementation"(libs.library("androidx-test-espresso-core"))
}
}
configureComposeCompiler()
}
3 changes: 0 additions & 3 deletions feature/firmware/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ dependencies {
implementation(libs.markdown.renderer)
implementation(libs.markdown.renderer.m3)

androidTestImplementation(libs.androidx.compose.ui.test.junit4)
androidTestImplementation(libs.androidx.test.ext.junit)

testImplementation(libs.junit)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.nordic.client.android.mock)
Expand Down
Loading