79 lines
1.9 KiB
Kotlin
79 lines
1.9 KiB
Kotlin
import com.android.build.api.dsl.ManagedVirtualDevice
|
|
|
|
plugins {
|
|
id("com.android.test")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("androidx.baselineprofile")
|
|
}
|
|
|
|
android {
|
|
buildTypes {
|
|
create("staging") {
|
|
}
|
|
create("benchmarkStaging") {
|
|
}
|
|
create("nonMinifiedStaging") {
|
|
}
|
|
}
|
|
flavorDimensions += listOf("abi")
|
|
productFlavors {
|
|
create("arm64-v8a") {
|
|
dimension = "abi"
|
|
ndk.abiFilters.add("arm64-v8a")
|
|
}
|
|
create("armeabi-v7a") {
|
|
dimension = "abi"
|
|
ndk.abiFilters.add("armeabi-v7a")
|
|
}
|
|
create("x86_64") {
|
|
dimension = "abi"
|
|
ndk.abiFilters.add("x86_64")
|
|
}
|
|
create("x86") {
|
|
dimension = "abi"
|
|
ndk.abiFilters.add("x86")
|
|
}
|
|
}
|
|
namespace = "com.dot.baselineprofile"
|
|
compileSdk = 34
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdk = 30
|
|
targetSdk = 34
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
targetProjectPath = ":app"
|
|
|
|
testOptions.managedDevices.devices {
|
|
create<ManagedVirtualDevice>("pixel6Api31") {
|
|
device = "Pixel 6"
|
|
apiLevel = 31
|
|
systemImageSource = "aosp"
|
|
}
|
|
}
|
|
}
|
|
|
|
// This is the configuration block for the Baseline Profile plugin.
|
|
// You can specify to run the generators on a managed devices or connected devices.
|
|
baselineProfile {
|
|
//managedDevices += "pixel6Api31"
|
|
useConnectedDevices = true
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.test.ext.junit)
|
|
implementation(libs.espresso.core)
|
|
implementation(libs.androidx.uiautomator)
|
|
implementation(libs.androidx.benchmark.macro.junit4)
|
|
} |