-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
Copy pathBUILD.bazel
69 lines (62 loc) · 2.19 KB
/
BUILD.bazel
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
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//:common_defs.bzl", "minSdkVersion", "targetSdkVersion")
licenses(["notice"]) # Apache 2.0
android_library(
name = "IntentsBasicSampleLib",
srcs = glob(["app/src/main/**/*.java"]),
custom_package = "com.example.android.testing.espresso.IntentsBasicSample",
manifest = "app/src/main/AndroidManifest.xml",
resource_files = glob(["app/src/main/res/**/*"]),
deps = [
"@maven//:androidx_annotation_annotation",
"@maven//:androidx_core_core",
"@maven//:com_google_guava_guava",
],
)
android_binary(
name = "IntentsBasicSample",
custom_package = "com.example.android.testing.espresso.IntentsBasicSample",
manifest = "app/src/main/AppManifest.xml",
manifest_values = {
"minSdkVersion": minSdkVersion,
"targetSdkVersion": targetSdkVersion,
},
deps = [":IntentsBasicSampleLib"],
)
android_library(
name = "IntentsBasicSampleTestLib",
srcs = glob(["app/src/sharedTest/**/*.java"]),
custom_package = "com.example.android.testing.espresso.IntentsBasicSample.test",
deps = [
":IntentsBasicSampleLib",
"//:test_deps",
"@maven//:androidx_test_espresso_espresso_intents",
"@maven//:androidx_test_ext_truth",
"@maven//:com_google_truth_truth",
"@maven//:org_robolectric_robolectric",
"@maven//:org_robolectric_annotations",
"@maven//:junit_junit",
],
)
android_binary(
name = "IntentsBasicSampleTest",
custom_package = "com.example.android.testing.espresso.IntentsBasicSample.test",
instruments = ":IntentsBasicSample",
manifest = "app/src/androidTest/AndroidManifest.xml",
manifest_values = {
"minSdkVersion": minSdkVersion,
"targetSdkVersion": targetSdkVersion,
},
deps = [":IntentsBasicSampleTestLib"],
)
API_LEVELS = [
"19_x86",
"21_x86",
"22_x86",
"23_x86",
]
[android_instrumentation_test(
name = "IntentsBasicSampleInstrumentationTest_%s" % API_LEVEL,
target_device = "@android_test_support//tools/android/emulated_devices/generic_phone:android_%s_qemu2" % API_LEVEL,
test_app = ":IntentsBasicSampleTest",
) for API_LEVEL in API_LEVELS]