xref: /aosp_15_r20/external/jazzer-api/repositories.bzl (revision 33edd6723662ea34453766bfdca85dbfdd5342b8)
1# Copyright 2021 Code Intelligence GmbH
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15"""Contains the external dependencies required to build Jazzer (but not the examples)."""
16
17load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_jar")
18load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
19load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
20
21def jazzer_dependencies(android = False):
22    maybe(
23        http_archive,
24        name = "platforms",
25        sha256 = "5308fc1d8865406a49427ba24a9ab53087f17f5266a7aabbfc28823f3916e1ca",
26        urls = [
27            "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.6/platforms-0.0.6.tar.gz",
28            "https://github.com/bazelbuild/platforms/releases/download/0.0.6/platforms-0.0.6.tar.gz",
29        ],
30    )
31
32    maybe(
33        http_archive,
34        name = "bazel_skylib",
35        sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7",
36        urls = [
37            "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
38            "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.1.tar.gz",
39        ],
40    )
41
42    maybe(
43        http_archive,
44        name = "io_bazel_rules_kotlin",
45        sha256 = "01293740a16e474669aba5b5a1fe3d368de5832442f164e4fbfc566815a8bc3a",
46        url = "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.8/rules_kotlin_release.tgz",
47    )
48
49    maybe(
50        http_archive,
51        name = "rules_jvm_external",
52        sha256 = "f86fd42a809e1871ca0aabe89db0d440451219c3ce46c58da240c7dcdc00125f",
53        strip_prefix = "rules_jvm_external-5.2",
54        url = "https://github.com/bazelbuild/rules_jvm_external/releases/download/5.2/rules_jvm_external-5.2.tar.gz",
55    )
56
57    maybe(
58        http_archive,
59        name = "build_bazel_apple_support",
60        sha256 = "ce80afe548fd71ef27b48cb48a283ca21256a0900caec3c7ed9416241e000bfe",
61        strip_prefix = "apple_support-dab92884a6f031e63ac263e5de8a02f13ac42508",
62        url = "https://github.com/bazelbuild/apple_support/archive/dab92884a6f031e63ac263e5de8a02f13ac42508.tar.gz",
63    )
64
65    maybe(
66        http_archive,
67        name = "com_google_absl",
68        sha256 = "5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36",
69        strip_prefix = "abseil-cpp-20230125.3",
70        url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230125.3.tar.gz",
71    )
72
73    maybe(
74        http_archive,
75        name = "com_github_johnynek_bazel_jar_jar",
76        sha256 = "85260ebdaf86cf0ce6d0d0f0a3268a09f628c815513141a6b99a023116523f96",
77        strip_prefix = "bazel_jar_jar-78c8c13ff437e8397ffe80c9a4c905376720a339",
78        url = "https://github.com/bazeltools/bazel_jar_jar/archive/78c8c13ff437e8397ffe80c9a4c905376720a339.tar.gz",
79    )
80
81    maybe(
82        http_archive,
83        name = "com_github_jhalterman_typetools",
84        build_file = Label("//third_party:typetools.BUILD"),
85        sha256 = "4e11a613aebb3c35deef58d5d942e44802da1a6c6ef7f127419261f00a0a082c",
86        strip_prefix = "typetools-commit-887153d2a9adf032fac9f145594d0a0248618d48",
87        url = "https://github.com/CodeIntelligenceTesting/typetools/archive/refs/tags/commit-887153d2a9adf032fac9f145594d0a0248618d48.tar.gz",
88    )
89
90    maybe(
91        http_archive,
92        build_file = Label("//third_party:classgraph.BUILD"),
93        name = "com_github_classgraph_classgraph",
94        sha256 = "39a594834ec24ef8f604485e4ee54b8b6dfe0b0ee5020e70601a9dab538d5c9e",
95        strip_prefix = "classgraph-classgraph-4.8.160",
96        url = "https://github.com/classgraph/classgraph/archive/refs/tags/classgraph-4.8.160.tar.gz",
97    )
98
99    maybe(
100        http_archive,
101        name = "fmeum_rules_jni",
102        sha256 = "530a02c4d86f7bcfabd61e7de830f8c78fcb2ea70943eab8f2bfdad96620f1f5",
103        strip_prefix = "rules_jni-0.7.0",
104        url = "https://github.com/fmeum/rules_jni/archive/refs/tags/v0.7.0.tar.gz",
105    )
106
107    maybe(
108        http_jar,
109        name = "net_bytebuddy_byte_buddy_agent",
110        sha256 = "55f19862b870f5d85890ba5386b1b45e9bbc88d5fe1f819abe0c788b4929fa6b",
111        url = "https://repo1.maven.org/maven2/net/bytebuddy/byte-buddy-agent/1.14.5/byte-buddy-agent-1.14.5.jar",
112    )
113
114    maybe(
115        http_jar,
116        name = "org_ow2_asm_asm",
117        sha256 = "b62e84b5980729751b0458c534cf1366f727542bb8d158621335682a460f0353",
118        url = "https://repo1.maven.org/maven2/org/ow2/asm/asm/9.5/asm-9.5.jar",
119    )
120
121    maybe(
122        http_jar,
123        name = "org_ow2_asm_asm_commons",
124        sha256 = "72eee9fbafb9de8d9463f20dd584a48ceeb7e5152ad4c987bfbe17dd4811c9ae",
125        url = "https://repo1.maven.org/maven2/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar",
126    )
127
128    maybe(
129        http_jar,
130        name = "org_ow2_asm_asm_tree",
131        sha256 = "3c33a648191079aeaeaeb7c19a49b153952f9e40fe86fbac5205554ddd9acd94",
132        url = "https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar",
133    )
134
135    maybe(
136        http_jar,
137        name = "com_github_jsqlparser_jsqlparser",
138        sha256 = "61b02b8520fda987b7bc12878833b223234450e505de83c36e78abe6d69c0184",
139        url = "https://repo1.maven.org/maven2/com/github/jsqlparser/jsqlparser/4.6/jsqlparser-4.6.jar",
140    )
141
142    maybe(
143        http_jar,
144        name = "com_google_errorprone_error_prone_annotations",
145        sha256 = "9e6814cb71816988a4fd1b07a993a8f21bb7058d522c162b1de849e19bea54ae",
146        url = "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.18.0/error_prone_annotations-2.18.0.jar",
147    )
148
149    maybe(
150        http_jar,
151        name = "com_google_errorprone_error_prone_type_annotations",
152        sha256 = "d2ab73bc6807277f7463391504313e47bc3465ab1916339c8e82be633a9ab375",
153        url = "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_type_annotations/2.18.0/error_prone_type_annotations-2.18.0.jar",
154    )
155
156    maybe(
157        http_jar,
158        name = "com_google_protobuf_protobuf_java",
159        sha256 = "18a057f5e0f828daa92b71c19df91f6bcc2aad067ca2cdd6b5698055ca7bcece",
160        # Keep in sync with com_google_protobuf in WORKSPACE.
161        url = "https://repo1.maven.org/maven2/com/google/protobuf/protobuf-java/3.23.2/protobuf-java-3.23.2.jar",
162    )
163
164    maybe(
165        http_archive,
166        name = "jazzer_jacoco",
167        build_file = Label("//third_party:jacoco_internal.BUILD"),
168        patches = [
169            Label("//third_party:jacoco-make-probe-adapter-subclassable.patch"),
170            Label("//third_party:jacoco-make-probe-inserter-subclassable.patch"),
171            Label("//third_party:jacoco-ignore-offline-instrumentation.patch"),
172        ],
173        sha256 = "b6b90469db034dff01a8577d8e91da51bc40f328a988359028652771f20abf1d",
174        strip_prefix = "jacoco-0.8.9",
175        url = "https://github.com/jacoco/jacoco/archive/refs/tags/v0.8.9.tar.gz",
176    )
177
178    maybe(
179        http_archive,
180        name = "jazzer_libfuzzer",
181        build_file = Label("//third_party:libFuzzer.BUILD"),
182        sha256 = "200b32c897b1171824462706f577d7f1d6175da602eccfe570d2dceeac11d490",
183        strip_prefix = "llvm-project-jazzer-2023-04-25/compiler-rt/lib/fuzzer",
184        url = "https://github.com/CodeIntelligenceTesting/llvm-project-jazzer/archive/refs/tags/2023-04-25.tar.gz",
185    )
186
187    if android:
188        maybe(
189            git_repository,
190            name = "jazzer_slicer",
191            remote = "https://android.googlesource.com/platform/tools/dexter",
192            build_file = "//third_party:slicer.BUILD",
193            commit = "0fe35538da107ff48da6e9f9b92b55b014973bf8",
194        )
195