55 lines
1.4 KiB
Kotlin
55 lines
1.4 KiB
Kotlin
import com.flexcode.yummy.buidlsrc.Libs
|
|
import com.flexcode.yummy.buidlsrc.SDK
|
|
plugins {
|
|
id("com.android.test")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.flexcode.yummy.benchmark"
|
|
compileSdk = SDK.max
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdk = 23
|
|
targetSdk = SDK.max
|
|
|
|
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.
|
|
create("benchmark") {
|
|
isDebuggable = true
|
|
signingConfig = getByName("debug").signingConfig
|
|
matchingFallbacks += listOf("release")
|
|
}
|
|
}
|
|
|
|
targetProjectPath = ":app"
|
|
experimentalProperties["android.experimental.self-instrumenting"] = true
|
|
}
|
|
|
|
dependencies {
|
|
implementation(Libs.Testing.testJUnit)
|
|
implementation(Libs.Testing.espresso)
|
|
implementation(Libs.Testing.uiAutomator)
|
|
implementation(Libs.Testing.benchmark)
|
|
}
|
|
|
|
androidComponents {
|
|
beforeVariants(selector().all()) {
|
|
it.enabled = it.buildType == "benchmark"
|
|
}
|
|
}
|