-
-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathbuild.gradle
More file actions
105 lines (99 loc) · 3.53 KB
/
build.gradle
File metadata and controls
105 lines (99 loc) · 3.53 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
apply plugin: 'com.android.application'
apply plugin: 'com.osacky.fladle'
android {
compileSdk = 33
namespace = "com.osacky.flank.gradle.sample"
defaultConfig {
applicationId "com.osacky.flank.gradle.sample"
minSdk 23
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
fladle {
async = true
flankVersion = "23.+"
serviceAccountCredentials = project.layout.projectDirectory.file("flank-gradle-5cf02dc90531.json")
// Project Id is not needed if serviceAccountCredentials are set.
// projectId("flank-gradle")
useOrchestrator = true
environmentVariables = [
"clearPackageData": "true"
]
testTargets = [
"class com.osacky.flank.gradle.sample.ExampleInstrumentedTest#seeView"
]
devices = [
[ "model": "SmallPhone.arm", "version": "26" ],
[ "model": "MediumPhone.arm", "version": "33" ]
]
localResultsDir = "foo"
smartFlankGcsPath = "gs://test-lab-yr9w6qsdvy45q-iurp80dm95h8a/flank/test_app_android.xml"
configs {
oranges {
// Cannot use = syntax: https://github.com/gradle/gradle/issues/9987
useOrchestrator.set(false)
testTargets.set(project.provider { [
"class com.osacky.flank.gradle.sample.ExampleInstrumentedTest#runAndFail"
] })
flakyTestAttempts.set(3)
}
additionalTests {
useOrchestrator.set(false)
testTargets.set(project.provider { [
"class com.osacky.flank.gradle.sample.ExampleInstrumentedTest#runAndFail"
] })
flakyTestAttempts.set(3)
additionalTestApks.value(project.provider { [
"app: ../main/app/build/output/apk/debug/app.apk",
"test: ../main/app/build/output/apk/androidTest/debug/app-test.apk",
"app: ../sample/app/build/output/apk/debug/sample-app.apk",
"test: ../sample/app/build/output/apk/androidTest/debug/sample-app-test.apk",
"test: ../feature/room/build/output/apk/androidTest/debug/feature-room-test.apk",
"test: ../library/databases/build/output/apk/androidTest/debug/sample-databases-test.apk"
]})
}
perfTests {
devices.set([[ "model" : "SmallPhone.arm", "version" : "28" ], ["model" : "MediumPhone.arm", "version": "33"]])
testTargets.set([
"class com.sample.MyPerformanceTest"
])
}
regressionTests {
devices.set([[ "model" : "SmallPhone.arm", "version" : "28" ]])
testTargets.set([
"class com.sample.MyRegressionTest"
])
}
}
flakyTestAttempts = 1
}
fulladleModuleConfig {
clientDetails = [
"test-type": "PR",
"build-number": "132"
]
}
dependencies {
implementation(libs.appcompat)
implementation(libs.navigation.fragment.ktx)
implementation(libs.constraintlayout)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
}