Files
EhViewer/benchmark/build.gradle.kts
T
FooIbar 400d478bca Update build scripts for Kotlin 2.2
- Don't generate compatibility bridges and `DefaultImpls` classes
- Remove when guards compiler option as it became stable
- Address deprecation of `kotlinOptions`
2025-05-21 00:58:26 +08:00

55 lines
1.2 KiB
Kotlin

plugins {
alias(libs.plugins.android.test)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.baselineprofile)
}
android {
namespace = "com.ehviewer.baselineprofile"
defaultConfig {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
targetProjectPath = ":app"
flavorDimensions += listOf("api")
productFlavors {
create("default") { dimension = "api" }
create("marshmallow") { dimension = "api" }
}
testOptions.managedDevices.localDevices {
create("pixel6Api35") {
device = "Pixel 6"
apiLevel = 35
systemImageSource = "aosp-atd"
}
}
}
kotlin {
jvmToolchain(21)
}
baselineProfile {
managedDevices += "pixel6Api35"
useConnectedDevices = false
}
dependencies {
implementation(libs.androidx.junit)
implementation(libs.androidx.uiautomator)
implementation(libs.androidx.benchmark.macro.junit4)
}
androidComponents {
onVariants { v ->
val artifactsLoader = v.artifacts.getBuiltArtifactsLoader()
v.instrumentationRunnerArguments.put(
"targetAppId",
v.testedApks.map { artifactsLoader.load(it)!!.applicationId },
)
}
}