@@ -64,107 +64,91 @@ 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 (
90- http_jar ,
86+ versions . use_repository (
87+ http_repository ,
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 ,
90+ type = "jar" ,
9491 )
9592
96- maybe (
93+ versions . use_repository (
9794 http_jar ,
9895 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 ],
96+ version = versions .KOTLIN_BUILD_TOOLS_IMPL ,
10197 )
10298
10399 if is_bzlmod :
104100 return
105101
106- maybe (
102+ versions . use_repository (
107103 http_archive ,
108104 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" ,
105+ version = versions .PY_ABSL ,
114106 )
115107
116- maybe (
108+ versions . use_repository (
117109 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" ,
110+ name = "py_absl" ,
111+ version = versions .PY_ABSL ,
122112 )
123113
124- maybe (
114+ versions .use_repository (
115+ http_archive ,
116+ name = "rules_cc" ,
117+ version = versions .RULES_CC ,
118+ )
119+ versions .use_repository (
125120 http_archive ,
126121 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 ],
122+ version = versions .RULES_LICENSE ,
129123 )
130-
131- maybe (
124+ versions .use_repository (
132125 http_archive ,
133126 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 ],
127+ version = versions .RULES_ANDROID ,
137128 )
138129
139- maybe (
130+ versions . use_repository (
140131 http_archive ,
141132 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 ],
133+ version = versions .RULES_JAVA ,
144134 )
145135
146136 # See note in versions.bzl before updating bazel_skylib
147- maybe (
137+ versions . use_repository (
148138 http_archive ,
149139 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 ],
140+ version = versions .BAZEL_SKYLIB ,
152141 )
153142
154- maybe (
143+ versions . use_repository (
155144 http_archive ,
156145 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 ],
146+ version = versions .COM_GOOGLE_PROTOBUF ,
160147 )
161-
162- maybe (
148+ versions .use_repository (
163149 http_archive ,
164150 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 ],
151+ version = versions .RULES_PROTO ,
168152 )
169153
170154def kotlinc_version (release , sha256 ):
0 commit comments