Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ lazy val interface = project
sys.error(s"META-INF/services/coursier.jniutils.NativeApi not found in $orig")
}

ZipUtil.addToZip(
ZipUtil.addOrOverwriteInZip(
tmpDest1,
dest,
Seq(
Expand Down
6 changes: 4 additions & 2 deletions project/ZipUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,16 @@ object ZipUtil {

}

def addToZip(sourceZip: File, destZip: File, toAdd: Seq[(String, Array[Byte])]): Unit = {
def addOrOverwriteInZip(sourceZip: File, destZip: File, toAdd: Seq[(String, Array[Byte])]): Unit = {

val is = new FileInputStream(sourceZip)
val os = new FileOutputStream(destZip)
val bootstrapZip = new ZipInputStream(is)
val outputZip = new ZipOutputStream(os)

for ((ent, data) <- zipEntries(bootstrapZip)) {
val strip = toAdd.map(_._1).toSet

for ((ent, data) <- zipEntries(bootstrapZip) if !strip.contains(ent.getName)) {

// Same workaround as https://github.com/spring-projects/spring-boot/issues/13720
// (https://github.com/spring-projects/spring-boot/commit/a50646b7cc3ad941e748dfb450077e3a73706205#diff-2ff64cd06c0b25857e3e0dfdb6733174R144)
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1")
addSbtPlugin("com.lightbend.sbt" % "sbt-proguard" % "0.4.0")

libraryDependencies += "com.eed3si9n.jarjarabrams" %% "jarjar-abrams-core" % "1.8.0"
libraryDependencies += "com.eed3si9n.jarjarabrams" %% "jarjar-abrams-core" % "1.8.1"