mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 19:57:04 +05:30
benchmark: init
This commit is contained in:
parent
d8d43a4c88
commit
a66a915e16
12 changed files with 189 additions and 1 deletions
62
benchmark/build.gradle.kts
Normal file
62
benchmark/build.gradle.kts
Normal file
|
@ -0,0 +1,62 @@
|
|||
@file:Suppress("DSL_SCOPE_VIOLATION")
|
||||
|
||||
import com.android.build.api.dsl.ManagedVirtualDevice
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.android.test)
|
||||
id("dev.msfjarvis.claw.android-common")
|
||||
id("dev.msfjarvis.claw.kotlin-android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "dev.msfjarvis.claw.benchmark"
|
||||
|
||||
defaultConfig { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" }
|
||||
|
||||
buildTypes {
|
||||
// This benchmark buildType is used for benchmarking, and should function like your
|
||||
// release build (for example, with minification on). It's signed with a debug key
|
||||
// for easy local/CI testing.
|
||||
create("benchmark") {
|
||||
isDebuggable = true
|
||||
signingConfig = getByName("debug").signingConfig
|
||||
matchingFallbacks += listOf("release")
|
||||
setProguardFiles(
|
||||
listOf(
|
||||
"proguard-android-optimize.pro",
|
||||
"proguard-rules.pro",
|
||||
"proguard-rules-missing-classes.pro",
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
targetProjectPath = ":android"
|
||||
experimentalProperties["android.experimental.self-instrumenting"] = true
|
||||
|
||||
testOptions {
|
||||
managedDevices {
|
||||
devices {
|
||||
register<ManagedVirtualDevice>("pixel2api30") {
|
||||
device = "Pixel 2"
|
||||
apiLevel = 30
|
||||
systemImageSource = "aosp"
|
||||
require64Bit = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.androidx.benchmark.macro.junit4)
|
||||
implementation(libs.androidx.profileinstaller)
|
||||
implementation(libs.androidx.test.core)
|
||||
implementation(libs.androidx.test.ext.junit)
|
||||
implementation(libs.androidx.test.espresso.core)
|
||||
implementation(libs.androidx.test.rules)
|
||||
implementation(libs.androidx.test.runner)
|
||||
implementation(libs.androidx.test.uiautomator)
|
||||
}
|
||||
|
||||
androidComponents { beforeVariants(selector().all()) { it.enable = it.buildType == "benchmark" } }
|
Loading…
Add table
Add a link
Reference in a new issue