Keep only module-info.class in the root of runtime-fat-jar (#8961)

This commit is contained in:
Jaroslav Tulach 2024-02-06 06:23:55 +01:00 committed by GitHub
parent 9083ebfbbc
commit 427f5b0410
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2018,8 +2018,10 @@ lazy val `runtime-fat-jar` =
MergeStrategy.discard
case PathList("META-INF", "services", xs @ _*) =>
MergeStrategy.concat
case PathList(xs @ _*) if xs.last.contains("module-info") =>
case PathList("module-info.class") =>
MergeStrategy.preferProject
case PathList(xs @ _*) if xs.last.contains("module-info.class") =>
MergeStrategy.discard
case _ => MergeStrategy.first
}
)