plugins { alias(libs.plugins.android.application) apply false id("com.android.test") alias(libs.plugins.jetbrains.kotlin.android) } android { namespace = "com.shaarit.benchmark" compileSdk = 34 compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = "17" } defaultConfig { minSdk = 24 targetSdk = 34 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } buildTypes { create("benchmark") { isDebuggable = true signingConfig = signingConfigs.getByName("debug") matchingFallbacks += listOf("release") } } targetProjectPath = ":app" experimentalProperties["android.experimental.self-instrumenting"] = true } dependencies { implementation("androidx.test.ext:junit:1.1.5") implementation("androidx.test.espresso:espresso-core:3.5.1") implementation("androidx.test.uiautomator:uiautomator:2.2.0") implementation("androidx.benchmark:benchmark-macro-junit4:1.2.3") } androidComponents { beforeVariants(selector().all()) { it.enable = it.buildType == "benchmark" } }