build.gradle.kts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. }
  10. buildTypes {
  11. // This benchmark buildType is used for benchmarking, and should function like your
  12. // release build (for example, with minification on). It's signed with a debug key
  13. // for easy local/CI testing.
  14. create("benchmark") {
  15. isDebuggable = true
  16. signingConfig = getByName("debug").signingConfig
  17. matchingFallbacks += listOf("release")
  18. }
  19. }
  20. targetProjectPath = ":app"
  21. experimentalProperties["android.experimental.self-instrumenting"] = true
  22. }
  23. dependencies {
  24. implementation(androidx.test.ext)
  25. implementation(androidx.test.espresso.core)
  26. implementation(androidx.test.uiautomator)
  27. implementation(androidx.benchmark.macro)
  28. }
  29. androidComponents {
  30. beforeVariants(selector().all()) {
  31. it.enable = it.buildType == "benchmark"
  32. }
  33. }