1313# limitations under the License.
1414
1515
16- load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
17-
1816#############################
1917# Load nested repository
2018#############################
@@ -27,129 +25,19 @@ local_repository(
2725)
2826
2927#############################
30- # Load Bazel Skylib rules
28+ # Load Android Sdk
3129#############################
3230
33- BAZEL_SKYLIB_VERSION = "1.5.0"
34-
35- BAZEL_SKYLIB_SHA = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94"
36-
37- http_archive (
38- name = "bazel_skylib" ,
39- sha256 = BAZEL_SKYLIB_SHA ,
40- urls = [
41- "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/%s/bazel-skylib-%s.tar.gz" % (BAZEL_SKYLIB_VERSION , BAZEL_SKYLIB_VERSION ),
42- "https://github.com/bazelbuild/bazel-skylib/releases/download/%s/bazel-skylib-%s.tar.gz" % (BAZEL_SKYLIB_VERSION , BAZEL_SKYLIB_VERSION ),
43- ],
44- )
45-
46- load ("@bazel_skylib//:workspace.bzl" , "bazel_skylib_workspace" )
47-
48- bazel_skylib_workspace ()
49-
50- #############################
51- # Load rules_java repository
52- #############################
53-
54- http_archive (
55- name = "rules_java" ,
56- sha256 = "c73336802d0b4882e40770666ad055212df4ea62cfa6edf9cb0f9d29828a0934" ,
57- url = "https://github.com/bazelbuild/rules_java/releases/download/5.3.5/rules_java-5.3.5.tar.gz" ,
58- )
59-
60- ####################################################
61- # Load Protobuf repository (needed by bazel-common)
62- ####################################################
63-
64- http_archive (
65- name = "rules_proto" ,
66- # output from `sha256sum` on the downloaded tar.gz file
67- sha256 = "66bfdf8782796239d3875d37e7de19b1d94301e8972b3cbd2446b332429b4df1" ,
68- strip_prefix = "rules_proto-4.0.0" ,
69- urls = [
70- "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz" ,
71- "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz" ,
72- ],
73- )
74-
75- load ("@rules_proto//proto:repositories.bzl" , "rules_proto_dependencies" , "rules_proto_toolchains" )
76-
77- rules_proto_dependencies ()
78-
79- rules_proto_toolchains ()
80-
81- #############################
82- # Load Bazel-Common repository
83- #############################
84-
85- http_archive (
86- name = "google_bazel_common" ,
87- sha256 = "82a49fb27c01ad184db948747733159022f9464fc2e62da996fa700594d9ea42" ,
88- strip_prefix = "bazel-common-2a6b6406e12208e02b2060df0631fb30919080f3" ,
89- urls = ["https://github.com/google/bazel-common/archive/2a6b6406e12208e02b2060df0631fb30919080f3.zip" ],
90- )
91-
92- load ("@google_bazel_common//:workspace_defs.bzl" , "google_common_workspace_rules" )
93-
94- google_common_workspace_rules ()
95-
96- #############################
97- # Load Protobuf dependencies
98- #############################
99-
100- # rules_python and zlib are required by protobuf.
101- # TODO(ronshapiro): Figure out if zlib is in fact necessary, or if proto can depend on the
102- # @bazel_tools library directly. See discussion in
103- # https://github.com/protocolbuffers/protobuf/pull/5389#issuecomment-481785716
104- # TODO(cpovirk): Should we eventually get rules_python from "Bazel Federation?"
105- # https://github.com/bazelbuild/rules_python#getting-started
106-
107- http_archive (
108- name = "rules_python" ,
109- sha256 = "e5470e92a18aa51830db99a4d9c492cc613761d5bdb7131c04bd92b9834380f6" ,
110- strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27" ,
111- urls = ["https://github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz" ],
112- )
113-
114- http_archive (
115- name = "zlib" ,
116- build_file = "@com_google_protobuf//:third_party/zlib.BUILD" ,
117- sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff" ,
118- strip_prefix = "zlib-1.2.11" ,
119- urls = ["https://github.com/madler/zlib/archive/v1.2.11.tar.gz" ],
31+ android_sdk_repository (
32+ name = "androidsdk" ,
33+ api_level = 32 ,
34+ build_tools_version = "32.0.0" ,
12035)
12136
122- #############################
123- # Load Robolectric repository
124- #############################
125-
126- ROBOLECTRIC_VERSION = "4.4"
127-
128- http_archive (
129- name = "robolectric" ,
130- sha256 = "d4f2eb078a51f4e534ebf5e18b6cd4646d05eae9b362ac40b93831bdf46112c7" ,
131- strip_prefix = "robolectric-bazel-%s" % ROBOLECTRIC_VERSION ,
132- urls = ["https://github.com/robolectric/robolectric-bazel/archive/%s.tar.gz" % ROBOLECTRIC_VERSION ],
133- )
134-
135- load ("@robolectric//bazel:robolectric.bzl" , "robolectric_repositories" )
136-
137- robolectric_repositories ()
138-
13937#############################
14038# Load Kotlin repository
14139#############################
14240
143- RULES_KOTLIN_TAG = "v1.8"
144-
145- RULES_KOTLIN_SHA = "01293740a16e474669aba5b5a1fe3d368de5832442f164e4fbfc566815a8bc3a"
146-
147- http_archive (
148- name = "io_bazel_rules_kotlin" ,
149- sha256 = RULES_KOTLIN_SHA ,
150- urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/%s/rules_kotlin_release.tgz" % RULES_KOTLIN_TAG ],
151- )
152-
15341load ("@io_bazel_rules_kotlin//kotlin:repositories.bzl" , "kotlin_repositories" , "kotlinc_version" )
15442
15543KOTLIN_VERSION = "1.9.23"
@@ -172,23 +60,24 @@ kt_register_toolchains()
17260# Load Maven dependencies
17361#############################
17462
175- RULES_JVM_EXTERNAL_TAG = "4.5"
176-
177- RULES_JVM_EXTERNAL_SHA = "b17d7388feb9bfa7f2fa09031b32707df529f26c91ab9e5d909eb1676badd9a6"
178-
179- http_archive (
180- name = "rules_jvm_external" ,
181- sha256 = RULES_JVM_EXTERNAL_SHA ,
182- strip_prefix = "rules_jvm_external-%s" % RULES_JVM_EXTERNAL_TAG ,
183- url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG ,
184- )
185-
18663load ("@rules_jvm_external//:defs.bzl" , "maven_install" )
18764
18865ANDROID_LINT_VERSION = "30.1.0"
18966
67+ ANT_VERSION = "1.9.6"
68+
69+ ASM_VERSION = "9.6"
70+
19071AUTO_COMMON_VERSION = "1.2.1"
19172
73+ BYTE_BUDDY_VERSION = "1.9.10"
74+
75+ CHECKER_FRAMEWORK_VERSION = "2.5.3"
76+
77+ ECLIPSE_SISU_VERSION = "0.3.0"
78+
79+ ERROR_PRONE_VERSION = "2.14.0"
80+
19281# NOTE(bcorso): Even though we set the version here, our Guava version in
19382# processor code will use whatever version is built into JavaBuilder, which is
19483# tied to the version of Bazel we're using.
@@ -198,14 +87,10 @@ GRPC_VERSION = "1.2.0"
19887
19988INCAP_VERSION = "0.2"
20089
201- BYTE_BUDDY_VERSION = "1.9.10"
202-
203- CHECKER_FRAMEWORK_VERSION = "2.5.3"
204-
205- ERROR_PRONE_VERSION = "2.14.0"
206-
20790KSP_VERSION = KOTLIN_VERSION + "-1.0.19"
20891
92+ MAVEN_VERSION = "3.3.3"
93+
20994maven_install (
21095 artifacts = [
21196 "androidx.annotation:annotation:1.1.0" ,
@@ -264,16 +149,27 @@ maven_install(
264149 "io.grpc:grpc-protobuf:%s" % GRPC_VERSION ,
265150 "jakarta.inject:jakarta.inject-api:2.0.1" ,
266151 "javax.annotation:javax.annotation-api:1.3.2" ,
152+ "javax.enterprise:cdi-api:1.0" ,
267153 "javax.inject:javax.inject:1" ,
268154 "javax.inject:javax.inject-tck:1" ,
269155 "junit:junit:4.13" ,
270156 "net.bytebuddy:byte-buddy:%s" % BYTE_BUDDY_VERSION ,
271157 "net.bytebuddy:byte-buddy-agent:%s" % BYTE_BUDDY_VERSION ,
272158 "net.ltgt.gradle.incap:incap:%s" % INCAP_VERSION ,
273159 "net.ltgt.gradle.incap:incap-processor:%s" % INCAP_VERSION ,
160+ "org.apache.ant:ant:%s" % ANT_VERSION ,
161+ "org.apache.ant:ant-launcher:%s" % ANT_VERSION ,
162+ "org.apache.maven:maven-artifact:%s" % MAVEN_VERSION ,
163+ "org.apache.maven:maven-model:%s" % MAVEN_VERSION ,
164+ "org.apache.maven:maven-plugin-api:%s" % MAVEN_VERSION ,
274165 "org.checkerframework:checker-compat-qual:%s" % CHECKER_FRAMEWORK_VERSION ,
275166 "org.checkerframework:dataflow:%s" % CHECKER_FRAMEWORK_VERSION ,
276167 "org.checkerframework:javacutil:%s" % CHECKER_FRAMEWORK_VERSION ,
168+ "org.codehaus.plexus:plexus-utils:3.0.20" ,
169+ "org.codehaus.plexus:plexus-classworlds:2.5.2" ,
170+ "org.codehaus.plexus:plexus-component-annotations:1.5.5" ,
171+ "org.eclipse.sisu:org.eclipse.sisu.plexus:%s" % ECLIPSE_SISU_VERSION ,
172+ "org.eclipse.sisu:org.eclipse.sisu.inject:%s" % ECLIPSE_SISU_VERSION ,
277173 "org.hamcrest:hamcrest-core:1.3" ,
278174 "org.jetbrains.kotlin:kotlin-annotation-processing-embeddable:%s" % KOTLIN_VERSION ,
279175 "org.jetbrains.kotlin:kotlin-compiler-embeddable:%s" % KOTLIN_VERSION ,
@@ -282,7 +178,11 @@ maven_install(
282178 "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.6.2" ,
283179 "org.jspecify:jspecify:0.3.0" ,
284180 "org.mockito:mockito-core:2.28.2" ,
181+ "org.pantsbuild:jarjar:1.7.2" ,
285182 "org.objenesis:objenesis:1.0" ,
183+ "org.ow2.asm:asm:%s" % ASM_VERSION ,
184+ "org.ow2.asm:asm-tree:%s" % ASM_VERSION ,
185+ "org.ow2.asm:asm-commons:%s" % ASM_VERSION ,
286186 "org.robolectric:robolectric:4.4" ,
287187 "org.robolectric:shadows-framework:4.4" , # For ActivityController
288188 ],
0 commit comments