Skip to content

Commit

Permalink
(Re) add compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurz committed Jan 31, 2024
1 parent 4d7b121 commit d6d29e9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ val specs2Test = Seq(
).map("org.specs2" %% _ % "4.10.6" % Test cross (CrossVersion.for3Use2_13))
.map(_.exclude("org.scala-lang.modules", "*"))

val common = Seq(
scalacOptions ++= Seq("-deprecation", "-feature", "-unchecked", "-encoding", "utf8") ++
(CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 13)) => Seq("-Xsource:3", "-Xmigration")
case _ => Seq.empty
}),
javacOptions ++= Seq("-encoding", "UTF-8", "-Xlint:-options"),
)

lazy val acolyteVersion = "1.2.9"
lazy val acolyte = "org.eu.acolyte" %% "jdbc-scala" % acolyteVersion % Test

Expand All @@ -31,6 +40,7 @@ ThisBuild / mimaFailOnNoPrevious := false

lazy val `anorm-tokenizer` = project
.in(file("tokenizer"))
.settings(common)
.settings(
mimaPreviousArtifacts := {
if (scalaBinaryVersion.value == "3") {
Expand Down Expand Up @@ -128,6 +138,7 @@ lazy val xmlVer = Def.setting[String] {

lazy val `anorm-core` = project
.in(file("core"))
.settings(common)
.settings(
Seq(
name := "anorm",
Expand Down Expand Up @@ -226,6 +237,7 @@ lazy val `anorm-core` = project
.dependsOn(`anorm-tokenizer`)

lazy val `anorm-iteratee` = (project in file("iteratee"))
.settings(common)
.settings(
sourceDirectory := {
val v = scalaBinaryVersion.value
Expand Down Expand Up @@ -271,6 +283,7 @@ lazy val akkaVer = Def.setting[String] {
}

lazy val `anorm-akka` = (project in file("akka"))
.settings(common)
.settings(
mimaPreviousArtifacts := {
if (scalaBinaryVersion.value == "3") {
Expand Down Expand Up @@ -326,6 +339,7 @@ lazy val pekkoEnabled = Def.setting[Boolean] {
}

lazy val `anorm-pekko` = (project in file("pekko"))
.settings(common)
.settings(
mimaPreviousArtifacts := Set.empty,
sourceDirectory := {
Expand Down Expand Up @@ -393,6 +407,7 @@ val playVer = Def.setting[String] {
}

lazy val `anorm-postgres` = (project in file("postgres"))
.settings(common)
.settings(
mimaPreviousArtifacts := Set.empty,
scalacOptions ++= {
Expand Down Expand Up @@ -423,6 +438,7 @@ lazy val `anorm-postgres` = (project in file("postgres"))
.dependsOn(`anorm-core`)

lazy val `anorm-enumeratum` = (project in file("enumeratum"))
.settings(common)
.settings(
sourceDirectory := {
if (scalaBinaryVersion.value == "3") new java.io.File("/no/sources")
Expand Down Expand Up @@ -457,6 +473,7 @@ lazy val `anorm-parent` = (project in file("."))
`anorm-postgres`,
`anorm-enumeratum`
)
.settings(common)
.settings(
mimaPreviousArtifacts := Set.empty,
(Compile / headerSources) ++=
Expand All @@ -471,6 +488,7 @@ lazy val docs = project
.in(file("docs"))
.enablePlugins(Playdoc)
.configs(Docs)
.settings(common)
.settings(
name := "anorm-docs",
(Test / unmanagedSourceDirectories) ++= {
Expand Down

0 comments on commit d6d29e9

Please sign in to comment.