Skip to content

Commit

Permalink
try to fix issue with sbt-assembly and duplicate classes
Browse files Browse the repository at this point in the history
try assembly fix - take 2

Update build.sbt

try again

more sbt-assembly issues

scalafmt

try to fix gradle build
  • Loading branch information
pjfanning committed Aug 12, 2024
1 parent 28680fe commit 1b93e13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ lazy val codegen = Project(id = "codegen", base = file("codegen"))
(assembly / mainClass) := Some("org.apache.pekko.grpc.gen.Main"),
(assembly / assemblyOption) := (assembly / assemblyOption).value.withPrependShellScript(
Some(sbtassembly.AssemblyPlugin.defaultUniversalScript(shebang = true))),
(assembly / assemblyMergeStrategy) := {
case PathList("META-INF", _*) => MergeStrategy.discard
case _ => MergeStrategy.first
},
crossScalaVersions := Dependencies.Versions.CrossScalaForPlugin,
scalaVersion := scala212,
Compile / unmanagedSourceDirectories ++= {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ enablePlugins(PekkoGrpcPlugin)

assembly / assemblyMergeStrategy := {
// https://github.com/akka/akka/issues/29456
case PathList("google", "protobuf", _) => MergeStrategy.discard
case PathList("google", "protobuf", _, _) => MergeStrategy.discard
case PathList("google", "protobuf", _*) => MergeStrategy.discard
case PathList("META-INF", _*) => MergeStrategy.discard
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ enablePlugins(PekkoGrpcPlugin)

assembly / assemblyMergeStrategy := {
// https://github.com/akka/akka/issues/29456
case PathList("google", "protobuf", _) => MergeStrategy.discard
case PathList("google", "protobuf", _, _) => MergeStrategy.discard
case PathList("google", "protobuf", _*) => MergeStrategy.discard
case PathList("META-INF", _*) => MergeStrategy.discard
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
Expand Down

0 comments on commit 1b93e13

Please sign in to comment.