Files
coco 723ce1af5c a
2026-07-03 15:12:48 +08:00

54 lines
1.5 KiB
Kotlin

import com.skydoves.balloon.Configuration
plugins {
id("com.android.test")
id("org.jetbrains.kotlin.android")
id(libs.plugins.baseline.profile.get().pluginId)
}
android {
compileSdk = Configuration.compileSdk
namespace = "com.skydoves.balloon.benchmark"
defaultConfig {
minSdk = Configuration.minSdkBenchmark
targetSdk = Configuration.targetSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
targetProjectPath = ":benchmark-app"
testOptions.managedDevices.devices {
maybeCreate<com.android.build.api.dsl.ManagedVirtualDevice>("pixel6api31").apply {
device = "Pixel 6"
apiLevel = 31
systemImageSource = "aosp"
}
}
}
// This is the plugin configuration. Everything is optional. Defaults are in the
// comments. In this example, you use the GMD added earlier and disable connected devices.
baselineProfile {
// This specifies the managed devices to use that you run the tests on. The default
// is none.
managedDevices += "pixel6api31"
// This enables using connected devices to generate profiles. The default is true.
// When using connected devices, they must be rooted or API 33 and higher.
useConnectedDevices = false
}
dependencies {
implementation(libs.androidx.test.runner)
implementation(libs.androidx.test.uiautomator)
implementation(libs.androidx.benchmark.macro)
implementation(libs.androidx.profileinstaller)
}