Skip to content

Commit

Permalink
fixes for scala 2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ABMC831 committed Sep 17, 2024
1 parent 23d5485 commit a9d3aec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ lazy val models = project
commonSettings ++ Seq(
name := "KafkaCase-Models",
libraryDependencies ++= modelsDependencies,
scalacOptions ++= Seq("-Ymacro-annotations"),
)
scalacOptions ++= { if (scalaVersion.value.startsWith("2.13")) Seq("-Ymacro-annotations") else Seq("-Xmacro-settings:enable-macro-paradise") }
) ++ {
if (scalaVersion.value.startsWith("2.12")) {Seq(addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.full))} else {Seq.empty}
}
)
.enablePlugins(AutomateHeaderPlugin)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ object EdlaChangeTopic {
}

implicit val operationDecoder: Decoder[Operation] = Decoder.decodeString.emap {
case s"CREATE" => Right(CREATE())
case s"UPDATE" => Right(UPDATE())
case s"ARCHIVE" => Right(ARCHIVE())
case "CREATE" => Right(CREATE())
case "UPDATE" => Right(UPDATE())
case "ARCHIVE" => Right(ARCHIVE())
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ object SchemaRunTopic {
}

implicit val operationDecoder: Decoder[Status] = Decoder.decodeString.emap {
case s"Finished" => Right(Finished())
case s"Failed" => Right(Failed())
case s"Killed" => Right(Killed())
case "Finished" => Right(Finished())
case "Failed" => Right(Failed())
case "Killed" => Right(Killed())
}
}
}
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.2.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0")

0 comments on commit a9d3aec

Please sign in to comment.