0.2.0-dev Download ZIP
56 lines ·1.7 KB Raw
| 1 | plugins { |
| 2 | id 'com.android.test' |
| 3 | id 'org.jetbrains.kotlin.android' |
| 4 | } |
| 5 | |
| 6 | android { |
| 7 | namespace = 'org.godotengine.editor.v4.macrobenchmark' |
| 8 | compileSdk versions.compileSdk |
| 9 | |
| 10 | compileOptions { |
| 11 | sourceCompatibility versions.javaVersion |
| 12 | targetCompatibility versions.javaVersion |
| 13 | } |
| 14 | |
| 15 | kotlinOptions { |
| 16 | jvmTarget = versions.javaVersion |
| 17 | } |
| 18 | |
| 19 | defaultConfig { |
| 20 | minSdk versions.minSdk |
| 21 | targetSdk versions.targetSdk |
| 22 | missingDimensionStrategy 'products', 'editor' |
| 23 | missingDimensionStrategy 'android_distribution', 'android' |
| 24 | |
| 25 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 26 | testInstrumentationRunnerArguments["androidx.benchmark.suppressErrors"] = 'EMULATOR' |
| 27 | } |
| 28 | |
| 29 | buildTypes { |
| 30 | // This benchmark buildType is used for benchmarking, and should function like your |
| 31 | // release build (for example, with minification on). It's signed with a debug key |
| 32 | // for easy local/CI testing. |
| 33 | benchmark { |
| 34 | debuggable = true |
| 35 | signingConfig = debug.signingConfig |
| 36 | matchingFallbacks = ["release"] |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | targetProjectPath = ":editor" |
| 41 | experimentalProperties["android.experimental.self-instrumenting"] = true |
| 42 | } |
| 43 | |
| 44 | dependencies { |
| 45 | implementation 'androidx.benchmark:benchmark-macro-junit4:1.4.1' |
| 46 | implementation 'androidx.test.espresso:espresso-core:3.7.0' |
| 47 | implementation 'androidx.test.ext:junit:1.3.0' |
| 48 | implementation 'androidx.test.uiautomator:uiautomator:2.4.0' |
| 49 | implementation 'androidx.test:rules:1.7.0' |
| 50 | } |
| 51 | |
| 52 | androidComponents { |
| 53 | beforeVariants(selector().all()) { |
| 54 | enable = buildType == "benchmark" |
| 55 | } |
| 56 | } |