amethyst/benchmark/build.gradle

72 wiersze
2.5 KiB
Groovy

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.androidLibrary)
alias(libs.plugins.jetbrainsKotlinAndroid)
alias(libs.plugins.androidBenchmark)
}
android {
namespace 'com.vitorpamplona.amethyst.benchmark'
compileSdk libs.versions.android.compileSdk.get().toInteger()
defaultConfig {
minSdk libs.versions.android.minSdk.get().toInteger()
targetSdk libs.versions.android.targetSdk.get().toInteger()
// 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
}
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 false
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
}
}
}
kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
freeCompilerArgs.add("-Xstring-concat=inline")
}
}
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 project(path: ':ammolite')
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
}