Skip to content

Commit 9cfccc3

Browse files
authored
[ksp] Rename files during extraction (#1201)
1 parent f14d01e commit 9cfccc3

File tree

1 file changed

+9
-9
lines changed
  • src/main/starlark/core/repositories

1 file changed

+9
-9
lines changed

src/main/starlark/core/repositories/ksp.bzl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ def _ksp_compiler_plugin_repository_impl(repository_ctx):
1010
repository_ctx.download_and_extract(
1111
attr.urls,
1212
sha256 = attr.sha256,
13+
# Move the jars to the top level and remove verison information.
14+
rename_files = {
15+
"com/google/devtools/ksp/{jar}/{version}/{jar}-{version}.jar".format(
16+
jar = jar,
17+
version = attr.strip_version,
18+
): "{jar}.jar".format(jar = jar)
19+
for jar in _JARS_INSIDE_REPO
20+
},
1321
)
1422

15-
# Move the jars that we need into the root of the workspace and strip the
16-
# version specific information out of the file name.
17-
for jar in _JARS_INSIDE_REPO:
18-
args = [
19-
"mv",
20-
"com/google/devtools/ksp/{jar}/{version}/{jar}-{version}.jar".format(jar = jar, version = attr.strip_version),
21-
"{jar}.jar".format(jar = jar),
22-
]
23-
repository_ctx.execute(args, quiet = False)
23+
# Remove unused .pom and checksum files files.
2424
repository_ctx.delete("com")
2525

2626
repository_ctx.file(

0 commit comments

Comments
 (0)