Skip to content

Commit

Permalink
Make it compile with new Java
Browse files Browse the repository at this point in the history
  • Loading branch information
gbastkowski committed Jun 11, 2024
1 parent e32deda commit d4c380b
Show file tree
Hide file tree
Showing 4 changed files with 1,207 additions and 3 deletions.
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ lazy val site = project
docsMappingsAPIDir := "api",
addMappingsToSiteDir(ScalaUnidoc / packageDoc / mappings, docsMappingsAPIDir),
libraryDependencies ++= Dependencies.site,
tpolecatCiModeOptions ~= { opts => opts.filterNot(_ == ScalacOptions.fatalWarnings) },
// tpolecatCiModeOptions ~= { opts => opts.filterNot(_ == ScalacOptions.fatalWarnings) },
mdocExtraArguments := Seq("--no-link-hygiene"),
githubWorkflowArtifactUpload := false
)
Expand All @@ -155,6 +155,15 @@ lazy val core = project
.flatten
)

lazy val rt = project
.in(file("rt"))
.settings(commonSettings)
.settings(
name := "fs2-gtfs-rt",
Compile / PB.targets := Seq(scalapb.gen(grpc = false) -> (Compile / sourceManaged).value)
)
.dependsOn(core)

lazy val rules = project
.in(file("rules"))
.settings(commonSettings)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/com/mobimeo/gtfs/model/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ package object model {
CellEncoder.stringEncoder.contramap(_.getCurrencyCode())

implicit val localeDecoder: CellDecoder[ju.Locale] =
CellDecoder.stringDecoder.map(new ju.Locale(_))
CellDecoder.stringDecoder.map(ju.Locale.forLanguageTag(_))

implicit val localeEncoder: CellEncoder[ju.Locale] =
CellEncoder.stringEncoder.contramap(_.getISO3Language())
Expand Down
6 changes: 5 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ThisBuild / libraryDependencySchemes ++= Seq(
)

// strict compiler flags
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4")
// addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4")
// source code formatting
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")
// coverage
Expand All @@ -21,3 +21,7 @@ addSbtPlugin("com.47deg" % "sbt-microsites" % "1.4.3")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
// release automatically
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")

addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7")

libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.15"
Loading

0 comments on commit d4c380b

Please sign in to comment.