Skip to content

Commit 0a6d695

Browse files
Update coursier to 2.1.0-M2
1 parent a6a6502 commit 0a6d695

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

build.sbt

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ lazy val interface = project
5454
rename("org.fusesource.**", "coursierapi.shaded.org.fusesource.@1"),
5555
rename("io.github.alexarchambault.windowsansi.**", "coursierapi.shaded.windowsansi.@1"),
5656
rename("concurrentrefhashmap.**", "coursierapi.shaded.concurrentrefhashmap.@1"),
57+
rename("org.codehaus.plexus.util.**", "coursierapi.shaded.plexusutil.@1")
5758
)
5859

5960
val processor = new org.pantsbuild.jarjar.JJProcessor(
@@ -64,7 +65,24 @@ lazy val interface = project
6465
)
6566
StandaloneJarProcessor.run(orig, tmpDest, processor)
6667

67-
ZipUtil.removeFromZip(tmpDest, dest, Set("LICENSE", "NOTICE"))
68+
val toBeRemoved = Set(
69+
"LICENSE",
70+
"NOTICE",
71+
"README"
72+
)
73+
val directoriesToBeRemoved = Seq(
74+
"licenses/"
75+
)
76+
assert(directoriesToBeRemoved.forall(_.endsWith("/")))
77+
ZipUtil.removeFromZip(
78+
tmpDest,
79+
dest,
80+
name =>
81+
toBeRemoved(name) || directoriesToBeRemoved.exists(dir =>
82+
name.startsWith(dir)
83+
)
84+
)
85+
6886
tmpDest.delete()
6987
}
7088
Check.onlyNamespace("coursierapi", dest)
@@ -128,7 +146,7 @@ lazy val interface = project
128146

129147
Settings.shared,
130148
Settings.mima(),
131-
libraryDependencies += "io.get-coursier" %% "coursier" % "2.0.16",
149+
libraryDependencies += "io.get-coursier" %% "coursier" % "2.1.0-M2",
132150

133151
libraryDependencies += "com.lihaoyi" %% "utest" % "0.7.10" % Test,
134152
testFrameworks += new TestFramework("utest.runner.Framework"),

project/ZipUtil.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import java.io.{ByteArrayOutputStream, File, FileInputStream, FileOutputStream,
44

55
object ZipUtil {
66

7-
def removeFromZip(sourceZip: File, destZip: File, remove: Set[String]): Unit = {
7+
def removeFromZip(sourceZip: File, destZip: File, remove: String => Boolean): Unit = {
88

99
val is = new FileInputStream(sourceZip)
1010
val os = new FileOutputStream(destZip)

0 commit comments

Comments
 (0)