@@ -64,107 +64,90 @@ def kotlin_repositories(
6464 strip_version = ksp_compiler_release .version ,
6565 )
6666
67- maybe (
67+ versions . use_repository (
6868 http_file ,
6969 name = "com_github_pinterest_ktlint" ,
70- sha256 = versions .PINTEREST_KTLINT .sha256 ,
71- urls = [url .format (version = versions .PINTEREST_KTLINT .version ) for url in versions .PINTEREST_KTLINT .url_templates ],
70+ version = versions .PINTEREST_KTLINT ,
7271 executable = True ,
7372 )
7473
7574 maybe (
7675 http_jar ,
7776 name = "kotlinx_serialization_core_jvm" ,
78- sha256 = versions .KOTLINX_SERIALIZATION_CORE_JVM .sha256 ,
79- urls = [url .format (version = versions .KOTLINX_SERIALIZATION_CORE_JVM .version ) for url in versions .KOTLINX_SERIALIZATION_CORE_JVM .url_templates ],
77+ version = versions .KOTLINX_SERIALIZATION_CORE_JVM ,
8078 )
8179
82- maybe (
80+ versions . use_repository (
8381 http_jar ,
8482 name = "kotlinx_serialization_json" ,
85- sha256 = versions .KOTLINX_SERIALIZATION_JSON .sha256 ,
86- urls = [url .format (version = versions .KOTLINX_SERIALIZATION_JSON .version ) for url in versions .KOTLINX_SERIALIZATION_JSON .url_templates ],
83+ version = versions .KOTLINX_SERIALIZATION_JSON ,
8784 )
8885
89- maybe (
86+ versions . use_repository (
9087 http_jar ,
9188 name = "kotlinx_serialization_json_jvm" ,
92- sha256 = versions .KOTLINX_SERIALIZATION_JSON_JVM .sha256 ,
93- urls = [url .format (version = versions .KOTLINX_SERIALIZATION_JSON_JVM .version ) for url in versions .KOTLINX_SERIALIZATION_JSON_JVM .url_templates ],
89+ version = versions .KOTLINX_SERIALIZATION_JSON_JVM ,
9490 )
9591
96- maybe (
92+ versions . use_repository (
9793 http_jar ,
9894 name = "kotlin_build_tools_impl" ,
99- sha256 = versions .KOTLIN_BUILD_TOOLS_IMPL .sha256 ,
100- urls = [url .format (version = versions .KOTLIN_BUILD_TOOLS_IMPL .version ) for url in versions .KOTLIN_BUILD_TOOLS_IMPL .url_templates ],
95+ version = versions .KOTLIN_BUILD_TOOLS_IMPL ,
10196 )
10297
10398 if is_bzlmod :
10499 return
105100
106- maybe (
101+ versions . use_repository (
107102 http_archive ,
108103 name = "py_absl" ,
109- sha256 = "8a3d0830e4eb4f66c4fa907c06edf6ce1c719ced811a12e26d9d3162f8471758" ,
110- urls = [
111- "https://github.com/abseil/abseil-py/archive/refs/tags/v2.1.0.tar.gz" ,
112- ],
113- strip_prefix = "abseil-py-2.1.0" ,
104+ version = versions .PY_ABSL ,
114105 )
115106
116- maybe (
107+ versions . use_repository (
117108 http_archive ,
118- name = "rules_cc" ,
119- urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.16/rules_cc-0.0.16.tar.gz" ],
120- sha256 = "bbf1ae2f83305b7053b11e4467d317a7ba3517a12cef608543c1b1c5bf48a4df" ,
121- strip_prefix = "rules_cc-0.0.16" ,
109+ name = "py_absl" ,
110+ version = versions .PY_ABSL ,
122111 )
123112
124- maybe (
113+ versions .use_repository (
114+ http_archive ,
115+ name = "rules_cc" ,
116+ version = versions .RULES_CC ,
117+ )
118+ versions .use_repository (
125119 http_archive ,
126120 name = "rules_license" ,
127- sha256 = versions .RULES_LICENSE .sha256 ,
128- urls = [url .format (version = versions .RULES_LICENSE .version ) for url in versions .RULES_LICENSE .url_templates ],
121+ version = versions .RULES_LICENSE ,
129122 )
130-
131- maybe (
123+ versions .use_repository (
132124 http_archive ,
133125 name = "rules_android" ,
134- sha256 = versions .RULES_ANDROID .sha256 ,
135- strip_prefix = versions .RULES_ANDROID .strip_prefix_template .format (version = versions .RULES_ANDROID .version ),
136- urls = [url .format (version = versions .RULES_ANDROID .version ) for url in versions .RULES_ANDROID .url_templates ],
126+ version = versions .RULES_ANDROID ,
137127 )
138128
139- maybe (
129+ versions . use_repository (
140130 http_archive ,
141131 name = "rules_java" ,
142- sha256 = versions .RULES_JAVA .sha256 ,
143- urls = [url .format (version = versions .RULES_JAVA .version ) for url in versions .RULES_JAVA .url_templates ],
132+ version = versions .RULES_JAVA ,
144133 )
145134
146135 # See note in versions.bzl before updating bazel_skylib
147- maybe (
136+ versions . use_repository (
148137 http_archive ,
149138 name = "bazel_skylib" ,
150- sha256 = versions .BAZEL_SKYLIB .sha256 ,
151- urls = [url .format (version = versions .BAZEL_SKYLIB .version ) for url in versions .BAZEL_SKYLIB .url_templates ],
139+ version = versions .BAZEL_SKYLIB ,
152140 )
153141
154- maybe (
142+ versions . use_repository (
155143 http_archive ,
156144 name = "com_google_protobuf" ,
157- sha256 = versions .COM_GOOGLE_PROTOBUF .sha256 ,
158- strip_prefix = versions .COM_GOOGLE_PROTOBUF .strip_prefix_template .format (version = versions .COM_GOOGLE_PROTOBUF .version ),
159- urls = [url .format (version = versions .COM_GOOGLE_PROTOBUF .version ) for url in versions .COM_GOOGLE_PROTOBUF .url_templates ],
145+ version = versions .COM_GOOGLE_PROTOBUF ,
160146 )
161-
162- maybe (
147+ versions .use_repository (
163148 http_archive ,
164149 name = "rules_proto" ,
165- sha256 = versions .RULES_PROTO .sha256 ,
166- strip_prefix = versions .RULES_PROTO .strip_prefix_template .format (version = versions .RULES_PROTO .version ),
167- urls = [url .format (version = versions .RULES_PROTO .version ) for url in versions .RULES_PROTO .url_templates ],
150+ version = versions .RULES_PROTO ,
168151 )
169152
170153def kotlinc_version (release , sha256 ):
0 commit comments