plugins { // No version: `com.android.application` in :app has already put AGP on the build's plugin // classpath, and Gradle refuses a second request for a version of it ("already on the classpath // with an unknown version"). The version is still the one in the catalog — see libs.versions.toml. id("com.android.test") } /** * The macrobenchmark module: a test APK that instruments the app rather than shipping inside it. * * It has no production code and no build types of its own — it points at `:app`'s `benchmark` build * type through `targetProjectPath` and instruments that. `tools/verify.sh --release` compiles it so * that a rename in the app cannot leave these benchmarks quietly broken between device runs. */ android { namespace = "de.softwareapp_hb.filemanager.benchmark" compileSdk = 36 defaultConfig { minSdk = 26 targetSdk = 36 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } targetProjectPath = ":app" // The benchmark itself is the thing being instrumented: it starts the app under test, so it must // not be run as a normal instrumentation target. experimentalProperties["android.experimental.self-instrumenting"] = true compileOptions { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } } dependencies { implementation(libs.androidx.benchmark.macro.junit4) implementation(libs.androidx.test.ext.junit) implementation(libs.androidx.test.uiautomator) implementation(libs.androidx.test.runner) }