1"""Dependencies for Tink Java.""" 2 3load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 4load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") 5 6TINK_MAVEN_ARTIFACTS = [ 7 "com.google.protobuf:protobuf-java:4.28.2", 8 "com.google.protobuf:protobuf-javalite:4.28.2", 9 "androidx.annotation:annotation:1.8.2", 10 "androidx.test:monitor:1.7.2", 11 "com.google.api-client:google-api-client:2.2.0", 12 "com.google.code.findbugs:jsr305:3.0.2", 13 "com.google.code.gson:gson:2.10.1", 14 "com.google.errorprone:error_prone_annotations:2.22.0", 15 "com.google.http-client:google-http-client:1.43.3", 16 "com.google.truth:truth:0.44", 17 "junit:junit:4.13.2", 18 "org.conscrypt:conscrypt-openjdk-uber:2.5.2", 19 "org.ow2.asm:asm:7.0", 20 "org.ow2.asm:asm-commons:7.0", 21 "org.pantsbuild:jarjar:1.7.2", 22] 23 24def tink_java_deps(): 25 """Loads dependencies of Java Tink.""" 26 27 # Basic rules we need to add to bazel. 28 # Release from 2023-05-31. 29 maybe( 30 http_archive, 31 name = "bazel_skylib", 32 urls = [ 33 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz", 34 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz", 35 ], 36 sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa", 37 ) 38 39 # ------------------------------------------------------------------------- 40 # Protobuf. 41 # ------------------------------------------------------------------------- 42 # Release from 2024-09-18. 43 maybe( 44 http_archive, 45 name = "com_google_protobuf", 46 strip_prefix = "protobuf-28.2", 47 urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protobuf-28.2.tar.gz"], 48 sha256 = "b2340aa47faf7ef10a0328190319d3f3bee1b24f426d4ce8f4253b6f27ce16db", 49 ) 50 51 # ------------------------------------------------------------------------- 52 # Transitive Maven artifact resolution and publishing rules for Bazel. 53 # ------------------------------------------------------------------------- 54 # Release from 2023-06-23 55 maybe( 56 http_archive, 57 name = "rules_jvm_external", 58 strip_prefix = "rules_jvm_external-5.3", 59 url = "https://github.com/bazelbuild/rules_jvm_external/archive/5.3.zip", 60 sha256 = "6cc8444b20307113a62b676846c29ff018402fd4c7097fcd6d0a0fd5f2e86429", 61 ) 62 63 # ------------------------------------------------------------------------- 64 # Android rules for Bazel. 65 # ------------------------------------------------------------------------- 66 # Last release from 2018-08-07. 67 maybe( 68 http_archive, 69 name = "build_bazel_rules_android", 70 urls = ["https://github.com/bazelbuild/rules_android/archive/refs/tags/v0.1.1.zip"], 71 sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", 72 strip_prefix = "rules_android-0.1.1", 73 ) 74 75 # ------------------------------------------------------------------------- 76 # Wycheproof. 77 # ------------------------------------------------------------------------- 78 # Commit from 2019-12-17 79 maybe( 80 http_archive, 81 name = "wycheproof", 82 strip_prefix = "wycheproof-d8ed1ba95ac4c551db67f410c06131c3bc00a97c", 83 url = "https://github.com/google/wycheproof/archive/d8ed1ba95ac4c551db67f410c06131c3bc00a97c.zip", 84 sha256 = "eb1d558071acf1aa6d677d7f1cabec2328d1cf8381496c17185bd92b52ce7545", 85 ) 86 87 # ------------------------------------------------------------------------- 88 # Rules Python. 89 # ------------------------------------------------------------------------- 90 # Required by protobuf. 91 # Release from 2023-08-22. 92 maybe( 93 http_archive, 94 name = "rules_python", 95 sha256 = "5868e73107a8e85d8f323806e60cad7283f34b32163ea6ff1020cf27abef6036", 96 strip_prefix = "rules_python-0.25.0", 97 url = "https://github.com/bazelbuild/rules_python/releases/download/0.25.0/rules_python-0.25.0.tar.gz", 98 ) 99