feat: add database indices and testing
This commit is contained in:
+25
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user