1
1
"""Dependencies for Tink Java."""
2
2
3
3
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
4
+ load ("@bazel_tools//tools/build_defs/repo:utils.bzl" , "maybe" )
4
5
5
6
TINK_MAVEN_ARTIFACTS = [
6
- "com.google.protobuf:protobuf-java:3.25.1 " ,
7
- "com.google.protobuf:protobuf-javalite:3.25.1 " ,
7
+ "com.google.protobuf:protobuf-java:4.27.0 " ,
8
+ "com.google.protobuf:protobuf-javalite:4.27.0 " ,
8
9
"androidx.annotation:annotation:1.5.0" ,
9
10
"com.google.api-client:google-api-client:2.2.0" ,
10
11
"com.google.code.findbugs:jsr305:3.0.2" ,
@@ -23,16 +24,16 @@ def tink_java_deps():
23
24
"""Loads dependencies of Java Tink."""
24
25
25
26
# Basic rules we need to add to bazel.
26
- if not native . existing_rule ( "bazel_skylib" ):
27
- # Release from 2023-05-31.
28
- http_archive (
29
- name = "bazel_skylib" ,
30
- urls = [
31
- "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz" ,
32
- "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz" ,
33
- ],
34
- sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa" ,
35
- )
27
+ # Release from 2023-05-31.
28
+ maybe (
29
+ http_archive ,
30
+ name = "bazel_skylib" ,
31
+ urls = [
32
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz" ,
33
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz" ,
34
+ ],
35
+ sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa" ,
36
+ )
36
37
37
38
# -------------------------------------------------------------------------
38
39
# Protobuf.
@@ -43,47 +44,60 @@ def tink_java_deps():
43
44
# * @com_google_protobuf//:cc_toolchain
44
45
# * @com_google_protobuf//:java_toolchain
45
46
# This statement defines the @com_google_protobuf repo.
46
- if not native . existing_rule ( "com_google_protobuf" ):
47
- # Release X.24.3 from 2023-09-07.
48
- http_archive (
49
- name = "com_google_protobuf" ,
50
- strip_prefix = "protobuf-24.3 " ,
51
- urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v24.3 .zip" ],
52
- sha256 = "ace0abf35274ee0f08d5564635505ed55a0bc346a6534413d3c5b040fc926332 " ,
53
- )
47
+ # Release May 23rd, 2024.
48
+ maybe (
49
+ http_archive ,
50
+ name = "com_google_protobuf" ,
51
+ strip_prefix = "protobuf-27.0 " ,
52
+ urls = ["https://github.com/protocolbuffers/protobuf/archive/refs/tags/v27.0 .zip" ],
53
+ sha256 = "a7e735f510520b41962d07459f6f5b99dd594c7ed4690bf1191b9924bec094a2 " ,
54
+ )
54
55
55
56
# -------------------------------------------------------------------------
56
57
# Transitive Maven artifact resolution and publishing rules for Bazel.
57
58
# -------------------------------------------------------------------------
58
- if not native . existing_rule ( "rules_jvm_external" ):
59
- # Release from 2023-06-23
60
- http_archive (
61
- name = "rules_jvm_external" ,
62
- strip_prefix = "rules_jvm_external-5.3" ,
63
- url = "https://github.com/bazelbuild/rules_jvm_external/archive/5.3.zip" ,
64
- sha256 = "6cc8444b20307113a62b676846c29ff018402fd4c7097fcd6d0a0fd5f2e86429" ,
65
- )
59
+ # Release from 2023-06-23
60
+ maybe (
61
+ http_archive ,
62
+ name = "rules_jvm_external" ,
63
+ strip_prefix = "rules_jvm_external-5.3" ,
64
+ url = "https://github.com/bazelbuild/rules_jvm_external/archive/5.3.zip" ,
65
+ sha256 = "6cc8444b20307113a62b676846c29ff018402fd4c7097fcd6d0a0fd5f2e86429" ,
66
+ )
66
67
67
68
# -------------------------------------------------------------------------
68
69
# Android rules for Bazel.
69
70
# -------------------------------------------------------------------------
70
- if not native . existing_rule ( "build_bazel_rules_android" ):
71
- # Last release from 2018-08-07.
72
- http_archive (
73
- name = "build_bazel_rules_android" ,
74
- urls = ["https://github.com/bazelbuild/rules_android/archive/refs/tags/v0.1.1.zip" ],
75
- sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806" ,
76
- strip_prefix = "rules_android-0.1.1" ,
77
- )
71
+ # Last release from 2018-08-07.
72
+ maybe (
73
+ http_archive ,
74
+ name = "build_bazel_rules_android" ,
75
+ urls = ["https://github.com/bazelbuild/rules_android/archive/refs/tags/v0.1.1.zip" ],
76
+ sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806" ,
77
+ strip_prefix = "rules_android-0.1.1" ,
78
+ )
78
79
79
80
# -------------------------------------------------------------------------
80
81
# Wycheproof.
81
82
# -------------------------------------------------------------------------
82
- if not native .existing_rule ("wycheproof" ):
83
- # Commit from 2019-12-17
84
- http_archive (
85
- name = "wycheproof" ,
86
- strip_prefix = "wycheproof-d8ed1ba95ac4c551db67f410c06131c3bc00a97c" ,
87
- url = "https://github.com/google/wycheproof/archive/d8ed1ba95ac4c551db67f410c06131c3bc00a97c.zip" ,
88
- sha256 = "eb1d558071acf1aa6d677d7f1cabec2328d1cf8381496c17185bd92b52ce7545" ,
89
- )
83
+ # Commit from 2019-12-17
84
+ maybe (
85
+ http_archive ,
86
+ name = "wycheproof" ,
87
+ strip_prefix = "wycheproof-d8ed1ba95ac4c551db67f410c06131c3bc00a97c" ,
88
+ url = "https://github.com/google/wycheproof/archive/d8ed1ba95ac4c551db67f410c06131c3bc00a97c.zip" ,
89
+ sha256 = "eb1d558071acf1aa6d677d7f1cabec2328d1cf8381496c17185bd92b52ce7545" ,
90
+ )
91
+
92
+ # -------------------------------------------------------------------------
93
+ # Rules Python.
94
+ # -------------------------------------------------------------------------
95
+ # Required by protobuf.
96
+ # Release from Aug 22, 2023
97
+ maybe (
98
+ http_archive ,
99
+ name = "rules_python" ,
100
+ sha256 = "5868e73107a8e85d8f323806e60cad7283f34b32163ea6ff1020cf27abef6036" ,
101
+ strip_prefix = "rules_python-0.25.0" ,
102
+ url = "https://github.com/bazelbuild/rules_python/releases/download/0.25.0/rules_python-0.25.0.tar.gz" ,
103
+ )
0 commit comments