2026-07-27 08:16:20 +12:00
|
|
|
plugins {
|
|
|
|
|
id("com.android.test")
|
|
|
|
|
id("org.jetbrains.kotlin.android")
|
2026-08-02 22:10:19 +12:00
|
|
|
id("androidx.baselineprofile")
|
2026-07-27 08:16:20 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
namespace = "com.ponzischeme89.memby.benchmark"
|
|
|
|
|
compileSdk = 35
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
2026-08-02 22:10:19 +12:00
|
|
|
// Baseline profile generation needs API 28+. The app itself still ships to 23 —
|
|
|
|
|
// this floor applies only to the machine generating the profile, not to the TVs
|
|
|
|
|
// that consume it.
|
|
|
|
|
minSdk = 28
|
2026-07-27 08:16:20 +12:00
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
2026-08-02 22:10:19 +12:00
|
|
|
// No DEBUGGABLE suppression any more: the baselineprofile plugin adds
|
|
|
|
|
// nonMinifiedRelease / benchmarkRelease variants to :app and mirrors them here,
|
|
|
|
|
// so these are real release numbers rather than the debug-influenced ones the
|
|
|
|
|
// Phase 1 setup produced.
|
|
|
|
|
testInstrumentationRunnerArguments["androidx.benchmark.enabledRules"] = "Macrobenchmark,BaselineProfile"
|
2026-07-27 08:16:20 +12:00
|
|
|
}
|
|
|
|
|
targetProjectPath = ":app"
|
|
|
|
|
experimentalProperties["android.experimental.self-instrumenting"] = true
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
create("release") {
|
|
|
|
|
initWith(getByName("debug"))
|
|
|
|
|
isDebuggable = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-02 22:10:19 +12:00
|
|
|
baselineProfile {
|
|
|
|
|
// A television is the only device that produces a representative profile for this
|
|
|
|
|
// app, so generation always runs against whatever is connected over adb.
|
|
|
|
|
useConnectedDevices = true
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-27 08:16:20 +12:00
|
|
|
kotlin {
|
|
|
|
|
compilerOptions {
|
|
|
|
|
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2026-08-02 22:10:19 +12:00
|
|
|
implementation("androidx.benchmark:benchmark-macro-junit4:1.3.4")
|
2026-07-27 08:16:20 +12:00
|
|
|
implementation("androidx.test.ext:junit:1.2.1")
|
|
|
|
|
implementation("androidx.test:runner:1.6.2")
|
2026-08-02 22:10:19 +12:00
|
|
|
implementation("androidx.test.uiautomator:uiautomator:2.3.0")
|
2026-07-27 08:16:20 +12:00
|
|
|
}
|