/
build.gradle
73 lines (62 loc) · 1.91 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import com.android.build.api.dsl.ManagedVirtualDevice
plugins {
id 'com.android.test'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.dolphin.benchmark'
compileSdk 33
compileOptions {
sourceCompatibility = "11"
targetCompatibility = "11"
}
kotlinOptions {
jvmTarget = "11"
}
defaultConfig {
minSdk 23
targetSdk 33
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
testOptions {
managedDevices {
devices {
pixel6Api31 (ManagedVirtualDevice) {
device = "Pixel 6"
apiLevel = 31
systemImageSource = "aosp"
}
}
}
}
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.
benchmark {
signingConfig signingConfigs.debug
matchingFallbacks = ['release']
debuggable true
applicationIdSuffix ".benchmark"
versionNameSuffix '-benchmark'
proguardFiles getDefaultProguardFile(
'proguard-android-optimize.txt'),
'proguard-rules.pro'
minifyEnabled true
shrinkResources true
}
}
targetProjectPath = ":app"
experimentalProperties["android.experimental.self-instrumenting"] = true
}
dependencies {
implementation 'androidx.test.ext:junit:1.1.5'
implementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'androidx.test.uiautomator:uiautomator:2.2.0'
implementation 'androidx.benchmark:benchmark-macro-junit4:1.1.1'
}
androidComponents {
beforeVariants(selector().all()) {
enabled = buildType == "benchmark"
}
}