mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
build: apply instrumented test dependencies conditionally (#4698)
This commit is contained in:
parent
8f055fda93
commit
17dcbed6b1
3 changed files with 11 additions and 6 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue