plugins { alias(libs.plugins.androidLibrary) alias(libs.plugins.jetbrainsKotlinAndroid) alias(libs.plugins.androidBenchmark) } android { namespace 'com.vitorpamplona.amethyst.benchmark' compileSdk 34 defaultConfig { minSdk 26 targetSdk 34 // Enable measuring on an emulator, or devices with low battery testInstrumentationRunner 'androidx.benchmark.junit4.AndroidBenchmarkRunner' testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = "EMULATOR,LOW-BATTERY" } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' } sourceSets.androidTest.assets.srcDirs += ["../quartz/src/androidTest/assets"] testBuildType = "benchmark" buildTypes { debug { // Since debuggable can"t be modified by gradle for library modules, // it must be done in a manifest - see src/androidTest/AndroidManifest.xml minifyEnabled true proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "benchmark-proguard-rules.pro" } release { isDefault = false minifyEnabled true } create("benchmark") { isDefault = true initWith(getByName("release")) signingConfig signingConfigs.debug } } } dependencies { androidTestImplementation platform(libs.androidx.compose.bom) androidTestImplementation libs.androidx.runner androidTestImplementation libs.androidx.junit androidTestImplementation libs.junit androidTestImplementation libs.androidx.benchmark.junit4 androidTestImplementation project(path: ':quartz') androidTestImplementation project(path: ':commons') androidTestImplementation libs.androidx.compose.foundation // Add your dependencies here. Note that you cannot benchmark code // in an app module this way - you will need to move any code you // want to benchmark to a library module: // https://developer.android.com/studio/projects/android-library#Convert }