|
| 1 | +# Copyright 2025 DeepMind Technologies Limited. |
| 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 | +# Bazel dependencies for building Catch. |
| 16 | +module( |
| 17 | + name = "catch", |
| 18 | + version = "1.0", |
| 19 | +) |
| 20 | + |
| 21 | +bazel_dep(name = "rules_android", version = "0.6.6") |
| 22 | +bazel_dep(name = "rules_kotlin", version = "2.1.8") |
| 23 | +bazel_dep(name = "rules_jvm_external", version = "6.7") |
| 24 | +bazel_dep(name = "rules_robolectric", version = "4.16", repo_name = "robolectric") |
| 25 | +bazel_dep(name = "rules_java", version = "9.0.3") |
| 26 | +bazel_dep(name = "protobuf", version = "30.0") |
| 27 | + |
| 28 | +# To avoid conflict with different protobuf versions. |
| 29 | +single_version_override( |
| 30 | + module_name = "protobuf", |
| 31 | + version = "30.0", |
| 32 | +) |
| 33 | + |
| 34 | +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") |
| 35 | + |
| 36 | +# Need to set testonly = True because the package depends on testonly targets. |
| 37 | +maven.artifact( |
| 38 | + testonly = True, |
| 39 | + artifact = "runner", |
| 40 | + group = "androidx.test", |
| 41 | + version = "1.7.0", |
| 42 | +) |
| 43 | +maven.artifact( |
| 44 | + testonly = True, |
| 45 | + artifact = "junit", |
| 46 | + group = "androidx.test.ext", |
| 47 | + version = "1.3.0", |
| 48 | +) |
| 49 | +maven.artifact( |
| 50 | + testonly = True, |
| 51 | + artifact = "mockito-android", |
| 52 | + group = "org.mockito", |
| 53 | + version = "5.20.0", |
| 54 | +) |
| 55 | +maven.artifact( |
| 56 | + testonly = True, |
| 57 | + artifact = "mockito-kotlin", |
| 58 | + group = "org.mockito.kotlin", |
| 59 | + version = "6.1.0", |
| 60 | +) |
| 61 | +maven.install( |
| 62 | + artifacts = [ |
| 63 | + "androidx.test.ext:junit:1.3.0", |
| 64 | + "androidx.test:runner:1.7.0", |
| 65 | + "com.google.guava:guava:32.0.1-jre", |
| 66 | + "com.google.truth:truth:1.4.0", |
| 67 | + "org.mockito.kotlin:mockito-kotlin:6.1.0", |
| 68 | + "org.mockito:mockito-core:5.20.0", |
| 69 | + "org.robolectric:robolectric:4.16", |
| 70 | + "org.yaml:snakeyaml:2.5", |
| 71 | + ], |
| 72 | + repositories = [ |
| 73 | + "https://maven.google.com", |
| 74 | + "https://repo1.maven.org/maven2", |
| 75 | + ], |
| 76 | +) |
| 77 | +use_repo(maven, "maven") |
| 78 | + |
| 79 | +remote_android_extensions = use_extension( |
| 80 | + "@rules_android//bzlmod_extensions:android_extensions.bzl", |
| 81 | + "remote_android_tools_extensions", |
| 82 | +) |
| 83 | +use_repo(remote_android_extensions, "android_tools") |
| 84 | + |
| 85 | +android_sdk_repository_extension = use_extension("@rules_android//rules/android_sdk_repository:rule.bzl", "android_sdk_repository_extension") |
| 86 | +use_repo(android_sdk_repository_extension, "androidsdk") |
0 commit comments