feat: add database indices and testing

This commit is contained in:
2026-06-08 15:01:06 +02:00
parent 2574a6e1e6
commit a232d4bfde
11 changed files with 289 additions and 7 deletions
+25 -1
View File
@@ -29,9 +29,13 @@ android {
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner = "androidx.benchmark.junit4.AndroidBenchmarkRunner"
testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = "ACTIVITY-MISSING"
}
testBuildType = "benchmark"
buildTypes {
release {
isMinifyEnabled = false
@@ -40,6 +44,13 @@ android {
"proguard-rules.pro"
)
}
create("benchmark") {
initWith(buildTypes.getByName("release"))
signingConfig = signingConfigs.getByName("debug") // sign with debug key for easy deployment
installation {
enableBaselineProfile = false // ← disables profile embedding for this build type only
}
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
@@ -61,6 +72,16 @@ android {
getByName("release") {
java.srcDirs("build/generated/ksp/release/kotlin")
}
getByName("benchmark") {
java.srcDirs("build/generated/ksp/benchmark/kotlin")
}
}
}
androidComponents {
onVariants(selector().withBuildType("benchmark")) { variant ->
variant.packaging.resources.excludes.add("baseline-prof.txt")
variant.packaging.resources.excludes.add("baseline.profm")
}
}
@@ -79,6 +100,9 @@ dependencies {
testImplementation(libs.junit)
androidTestImplementation(platform(libs.androidx.compose.bom))
androidTestImplementation(libs.androidx.compose.ui.test.junit4)
implementation(libs.androidx.benchmark.junit4)
androidTestImplementation(libs.androidx.runner)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.androidx.espresso.core)
androidTestImplementation(libs.androidx.junit)
debugImplementation(libs.androidx.compose.ui.test.manifest)