forked from android/android-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
247 lines (218 loc) · 9.33 KB
/
WORKSPACE
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# TODO(b/114418172): rename to androidx_test. Requires a bazel change
workspace(name = "android_test_support")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
RULES_JVM_EXTERNAL_TAG = "4.4.2"
RULES_JVM_EXTERNAL_SHA = "735602f50813eb2ea93ca3f5e43b1959bd80b213b836a07a62a29d757670b77b"
# This needs to be consistent with the KOTLIN_VERSION specified in build_extensions/axt_versions.bzl.
KOTLIN_VERSION = "1.6.21"
http_archive(
name = "rules_jvm_external",
sha256 = RULES_JVM_EXTERNAL_SHA,
strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG,
url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG,
)
# rules_proto defines proto_library.
http_archive(
name = "rules_proto",
sha256 = "2490dca4f249b8a9a3ab07bd1ba6eca085aaf8e45a734af92aad0c42d9dc7aaf",
strip_prefix = "rules_proto-218ffa7dfa5408492dc86c01ee637614f8695c45",
urls = [
"https://github.com/bazelbuild/rules_proto/archive/218ffa7dfa5408492dc86c01ee637614f8695c45.tar.gz",
],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
# The 'com_google_protobuf_javalite' package is required for Bazel 2.x and below.
http_archive(
name = "com_google_protobuf_javalite",
sha256 = "832c476bb442ca98a59c2291b8a504648d1c139b74acc15ef667a0e8f5e984e7",
strip_prefix = "protobuf-3.11.3",
urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.11.3.zip"],
)
load("@rules_jvm_external//:defs.bzl", "maven_install")
load("@rules_jvm_external//:specs.bzl", "maven")
load(
"//build_extensions:axt_versions.bzl",
"ANDROIDX_ANNOTATION_EXPERIMENTAL_VERSION",
"ANDROIDX_ANNOTATION_VERSION",
"ANDROIDX_COMPAT_VERSION",
"ANDROIDX_CONCURRENT_VERSION",
"ANDROIDX_CORE_VERSION",
"ANDROIDX_CURSOR_ADAPTER_VERSION",
"ANDROIDX_DRAWER_LAYOUT_VERSION",
"ANDROIDX_FRAGMENT_VERSION",
"ANDROIDX_JUNIT_VERSION",
"ANDROIDX_LEGACY_SUPPORT_VERSION",
"ANDROIDX_LIFECYCLE_VERSION",
"ANDROIDX_MULTIDEX_VERSION",
"ANDROIDX_RECYCLERVIEW_VERSION",
"ANDROIDX_TRACING_VERSION",
"ANDROIDX_VIEWPAGER_VERSION",
"CORE_VERSION",
"GOOGLE_MATERIAL_VERSION",
"GUAVA_LISTENABLEFUTURE_VERSION",
"GUAVA_VERSION",
"RUNNER_VERSION",
"UIAUTOMATOR_VERSION",
"JUNIT_VERSION"
)
maven_install(
name = "maven",
artifacts = [
"androidx.annotation:annotation:" + ANDROIDX_ANNOTATION_VERSION,
"androidx.annotation:annotation-experimental:jar:" + ANDROIDX_ANNOTATION_EXPERIMENTAL_VERSION,
"androidx.appcompat:appcompat:" + ANDROIDX_COMPAT_VERSION,
"androidx.concurrent:concurrent-futures:" + ANDROIDX_CONCURRENT_VERSION,
"androidx.core:core:" + ANDROIDX_CORE_VERSION,
"androidx.cursoradapter:cursoradapter:" + ANDROIDX_CURSOR_ADAPTER_VERSION,
"androidx.drawerlayout:drawerlayout:" + ANDROIDX_DRAWER_LAYOUT_VERSION,
"androidx.fragment:fragment:" + ANDROIDX_FRAGMENT_VERSION,
"androidx.legacy:legacy-support-core-ui:" + ANDROIDX_LEGACY_SUPPORT_VERSION,
"androidx.legacy:legacy-support-core-utils:" + ANDROIDX_LEGACY_SUPPORT_VERSION,
"androidx.legacy:legacy-support-v4:" + ANDROIDX_LEGACY_SUPPORT_VERSION,
"androidx.lifecycle:lifecycle-common:" + ANDROIDX_LIFECYCLE_VERSION,
"androidx.multidex:multidex:" + ANDROIDX_MULTIDEX_VERSION,
"androidx.recyclerview:recyclerview:" + ANDROIDX_RECYCLERVIEW_VERSION,
"androidx.tracing:tracing:" + ANDROIDX_TRACING_VERSION,
"androidx.test.uiautomator:uiautomator:" + UIAUTOMATOR_VERSION,
"androidx.viewpager:viewpager:" + ANDROIDX_VIEWPAGER_VERSION,
"aopalliance:aopalliance:1.0",
"com.android.tools.lint:lint-api:30.1.0",
"com.android.tools.lint:lint-checks:30.1.0",
"com.beust:jcommander:1.72",
maven.artifact(
artifact = "accessibility-test-framework",
exclusions = [
# exclude the org.checkerframework dependency since that require
# java8 compatibility. See b/176926990
maven.exclusion(
artifact = "checker",
group = "org.checkerframework",
),
# accessibility-test-framework depends on hamcrest 2.2 which causes 'Using type org.hamcrest.Matcher from an indirect dependency' compile errors
maven.exclusion(
artifact = "hamcrest-core",
group = "org.hamcrest",
),
maven.exclusion(
artifact = "hamcrest-library",
group = "org.hamcrest",
),
],
group = "com.google.android.apps.common.testing.accessibility.framework",
version = "3.1",
),
"com.google.android.material:material:" + GOOGLE_MATERIAL_VERSION,
"com.google.auto.value:auto-value:1.5.1",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.8.5",
"com.google.dagger:dagger-compiler:2.38.1",
"com.google.dagger:dagger-producers:2.38.1",
"com.google.dagger:dagger:2.38.1",
"com.google.errorprone:error_prone_annotations:2.9.0",
"com.google.errorprone:javac-shaded:9-dev-r4023-3",
"com.google.flogger:flogger-system-backend:0.4",
"com.google.flogger:flogger:0.4",
"com.google.flogger:google-extensions:0.4",
"com.google.googlejavaformat:google-java-format:1.4",
"com.google.guava:guava:" + GUAVA_VERSION,
"com.google.guava:listenablefuture:" + GUAVA_LISTENABLEFUTURE_VERSION,
"com.google.inject.extensions:guice-multibindings:4.1.0",
"com.google.inject:guice:4.1.0",
"com.google.truth:truth:1.0",
"com.googlecode.jarjar:jarjar:1.3",
"com.linkedin.dexmaker:dexmaker-mockito:jar:2.28.1",
"com.linkedin.dexmaker:dexmaker:2.28.1",
"com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0",
"com.squareup:javapoet:1.9.0",
"javax.annotation:javax.annotation-api:1.3.1",
"javax.inject:javax.inject:1",
"joda-time:joda-time:2.10.1",
"junit:junit:" + JUNIT_VERSION,
"net.bytebuddy:byte-buddy-agent:1.9.10",
"net.bytebuddy:byte-buddy:1.9.10",
"net.sf.kxml:kxml2:jar:2.3.0",
"org.ccil/cowan.tagsoup:tagsoup:1.2.1",
"org.checkerframework:checker-compat-qual:2.5.5",
"org.hamcrest:hamcrest-core:1.3",
"org.hamcrest:hamcrest-library:1.3",
"org.mockito:mockito-core:2.28.1",
"org.objenesis:objenesis:2.6",
"org.pantsbuild:jarjar:1.7.2",
maven.artifact(
artifact = "robolectric",
exclusions = [
# exclude the com.google.guava dependency since that require
# java8 compatibility.
maven.exclusion(
artifact = "guava",
group = "com.google.guava",
),
],
group = "org.robolectric",
version = "4.9",
),
],
repositories = [
"https://maven.google.com",
"https://repo1.maven.org/maven2",
"https://dl.bintray.com/linkedin/maven",
],
)
# need to have a isolated version tree for listenablefuture, because otherwise
# listenablefuture will get resolved to 9999.0-empty-to-avoid-conflict-with-guava
maven_install(
name = "maven_listenablefuture",
artifacts = [
"com.google.guava:listenablefuture:" + GUAVA_LISTENABLEFUTURE_VERSION,
],
repositories = [
"https://maven.google.com",
"https://repo1.maven.org/maven2",
"https://dl.bintray.com/linkedin/maven",
],
)
android_sdk_repository(
name = "androidsdk",
api_level = 33,
build_tools_version = "30.0.3",
)
load("//:repo.bzl", "android_test_repositories")
android_test_repositories(with_dev_repositories = True)
load("@robolectric//bazel:robolectric.bzl", "robolectric_repositories")
robolectric_repositories()
# Kotlin toolchains
rules_kotlin_version = "1.5.0"
rules_kotlin_sha = "12d22a3d9cbcf00f2e2d8f0683ba87d3823cb8c7f6837568dd7e48846e023307"
http_archive(
name = "io_bazel_rules_kotlin",
sha256 = rules_kotlin_sha,
urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v%s/rules_kotlin_release.tgz" % rules_kotlin_version],
)
load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories", "kotlinc_version")
# Get from https://github.com/JetBrains/kotlin/releases/
KOTLINC_RELEASE_SHA = "632166fed89f3f430482f5aa07f2e20b923b72ef688c8f5a7df3aa1502c6d8ba"
kotlin_repositories(
compiler_release = kotlinc_version(
release = KOTLIN_VERSION,
sha256 = KOTLINC_RELEASE_SHA,
),
)
load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")
kt_register_toolchains()
# Android bazel rules
http_archive(
name = "build_bazel_rules_android",
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
strip_prefix = "rules_android-0.1.1",
urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
)
# Updated 2023-02-01
http_archive(
name = "rules_license",
urls = [
"https://github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
],
sha256 = "6157e1e68378532d0241ecd15d3c45f6e5cfd98fc10846045509fb2a7cc9e381",
)