forked from signalapp/Signal-Android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
81 lines (65 loc) · 2.19 KB
/
build.gradle.kts
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
74
75
76
77
78
79
80
81
@file:Suppress("UnstableApiUsage")
import com.android.build.api.dsl.ManagedVirtualDevice
import org.gradle.api.JavaVersion
import org.gradle.kotlin.dsl.extra
val benchmarkLibs = the<org.gradle.accessors.dm.LibrariesForBenchmarkLibs>()
val signalBuildToolsVersion: String by rootProject.extra
val signalCompileSdkVersion: String by rootProject.extra
val signalTargetSdkVersion: Int by rootProject.extra
val signalMinSdkVersion: Int by rootProject.extra
val signalJavaVersion: JavaVersion by rootProject.extra
val signalKotlinJvmTarget: String by rootProject.extra
plugins {
id("com.android.test")
id("org.jetbrains.kotlin.android")
}
android {
namespace = "org.signal.benchmark"
compileSdkVersion = signalCompileSdkVersion
compileOptions {
sourceCompatibility = signalJavaVersion
targetCompatibility = signalJavaVersion
}
kotlinOptions {
jvmTarget = signalKotlinJvmTarget
}
defaultConfig {
minSdk = 23
targetSdk = signalTargetSdkVersion
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
missingDimensionStrategy("environment", "prod")
missingDimensionStrategy("distribution", "play")
}
buildTypes {
create("benchmark") {
isDebuggable = true
signingConfig = getByName("debug").signingConfig
matchingFallbacks += listOf("perf", "debug")
}
}
targetProjectPath = ":Signal-Android"
experimentalProperties["android.experimental.self-instrumenting"] = true
testOptions {
managedDevices {
devices {
create("api31", ManagedVirtualDevice::class) {
device = "Pixel 6"
apiLevel = 31
systemImageSource = "aosp"
require64Bit = false
}
}
}
}
}
dependencies {
implementation(benchmarkLibs.androidx.test.ext.junit)
implementation(benchmarkLibs.espresso.core)
implementation(benchmarkLibs.uiautomator)
implementation(benchmarkLibs.androidx.benchmark.macro)
}
androidComponents {
beforeVariants(selector().all()) {
it.enabled = it.buildType == "benchmark"
}
}