plugins { alias libs.plugins.android.test alias libs.plugins.androidx.baselineProfile alias libs.plugins.kotlin.android } android { namespace 'com.naviapp.benchmark' compileSdk 35 compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } testOptions { managedDevices { devices { pixel6Api30(com.android.build.api.dsl.ManagedVirtualDevice) { device = "Pixel 6" apiLevel = 30 systemImageSource = "aosp" } } } } kotlinOptions { jvmTarget = "17" } defaultConfig { minSdk 24 targetSdk 34 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = "LOW-BATTERY" testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = "EMULATOR" missingDimensionStrategy("contentType", "demo") } buildTypes { release { debuggable false minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } benchmark { debuggable true minifyEnabled false shrinkResources true testProguardFiles 'test.pro' signingConfig = debug.signingConfig matchingFallbacks = ["release"] } } targetProjectPath = ":app" experimentalProperties["android.experimental.self-instrumenting"] = true flavorDimensions = ["app"] productFlavors { qa { isDefault true dimension "app" } prod { dimension "app" } } } dependencies { implementation libs.androidx.benchmark.macro.junit4 implementation libs.androidx.test.junit implementation libs.androidx.test.espresso.core implementation libs.androidx.uiautomator } androidComponents { beforeVariants(selector().all()) { enable = buildType == "benchmark" } }