plugins { id 'com.android.test' id 'org.jetbrains.kotlin.android' } android { namespace 'com.google.samples.apps.nowinandroid.benchmark' compileSdk buildConfig.compileSdk compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = "1.8" } defaultConfig { minSdk 23 targetSdk 31 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { // This benchmark buildType is used for benchmarking, and should function like your // release build (for example, with minification on). It's signed with a debug key // for easy local/CI testing. benchmark { debuggable true signingConfig debug.signingConfig matchingFallbacks = ['release'] } } targetProjectPath = ":app" experimentalProperties["android.experimental.self-instrumenting"] = true } dependencies { implementation libs.androidx.test.core implementation libs.androidx.test.espresso.core implementation libs.androidx.test.ext implementation libs.androidx.test.runner implementation libs.androidx.test.rules implementation libs.androidx.test.uiautomator implementation libs.androidx.benchmark.macro implementation libs.androidx.profileinstaller } androidComponents { beforeVariants(selector().all()) { enabled = buildType == "benchmark" } }