build.gradle.kts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. plugins {
  2. id("com.android.test")
  3. kotlin("android")
  4. }
  5. android {
  6. namespace = "tachiyomi.macrobenchmark"
  7. defaultConfig {
  8. testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
  9. testInstrumentationRunnerArguments["androidx.benchmark.enabledRules"] = "BaselineProfile"
  10. }
  11. buildTypes {
  12. // This benchmark buildType is used for benchmarking, and should function like your
  13. // release build (for example, with minification on). It's signed with a debug key
  14. // for easy local/CI testing.
  15. create("benchmark") {
  16. isDebuggable = true
  17. signingConfig = getByName("debug").signingConfig
  18. matchingFallbacks.add("release")
  19. }
  20. }
  21. targetProjectPath = ":app"
  22. experimentalProperties["android.experimental.self-instrumenting"] = true
  23. }
  24. dependencies {
  25. implementation(androidx.test.ext)
  26. implementation(androidx.test.espresso.core)
  27. implementation(androidx.test.uiautomator)
  28. implementation(androidx.benchmark.macro)
  29. }
  30. androidComponents {
  31. beforeVariants(selector().all()) {
  32. it.enable = it.buildType == "benchmark"
  33. }
  34. }