in exposed-gradle-plugin/plugin-build/plugin/src/main/kotlin/com/jetbrains/exposed/gradle/plugin/shadowjar/KotlinRelocator.kt [59:71]
fun patchMetadata(task: ShadowJar) {
val zip = task.archiveFile.get().asFile.toPath()
FileSystems.newFileSystem(zip, null).use { fs ->
foundRelocatedSubPaths[task]?.forEach {
val packagePath = fs.getPath(it)
if (Files.exists(packagePath) && Files.isDirectory(packagePath)) {
Files.list(packagePath).forEach { file ->
task.patchFile(file)
}
}
}
}
}