Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private fun publishGav(
val newName = newArtifact.fileName()
renamedFiles.add(FileWithPath(it.file, "$gavPath/${newName}"))

if (newArtifact.extension.substringAfterLast('.') !in checksums) {
if (newArtifact.extension.substringAfterLast('.') !in setOf("md5", "sha1", "sha256", "sha512")) {
snapshotVersions.add(
VersionMetadata.SnapshotVersion(
classifier = newArtifact.classifier,
Expand All @@ -130,6 +130,8 @@ private fun publishGav(
updated = lastUpdated.asTimestamp(false),
),
)
} else {
// Ignore the checksums in the list of files
}
}

Expand Down Expand Up @@ -220,9 +222,6 @@ private fun publishGav(

val bytes = encodeToXml(newArtifactMetadata).toByteArray()
transport.put(artifactMetadataPath, bytes)
checksums.forEach {
transport.put("$artifactMetadataPath.$it", bytes.digest(it.uppercase()))
}
}


Expand All @@ -247,8 +246,6 @@ internal fun Instant.asTimestamp(withDot: Boolean): String {
)
}

internal val checksums = setOf("md5", "sha1", "sha256", "sha512")

internal inline fun <reified T> encodeToXml(t: T): String {
return xml.encodeToString(t)
}
Expand Down
Loading