Skip to content

Commit 2c551db

Browse files
committed
Move suppression to common runtime settings
1 parent 23fbd76 commit 2c551db

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

build.sbt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,17 @@ lazy val runtime = (projectMatrix in file("scalapb-runtime"))
6464
ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("*Extension*"),
6565
ProblemFilters.exclude[Problem]("scalapb.options.*"),
6666
ProblemFilters.exclude[FinalMethodProblem]("*.parseFrom")
67-
)
67+
),
68+
scalacOptions ++= {
69+
CrossVersion.partialVersion(scalaVersion.value) match {
70+
case Some((2, _)) =>
71+
Seq(
72+
"-Wconf:msg=[Uu]nused&origin=scala[.]collection[.]compat._:s",
73+
"-Wconf:cat=deprecation&msg=.*[Jj]avaGenerateEqualsAndHash.*deprecated.*:s"
74+
)
75+
case _ => Seq.empty // Scala 2.12 or other (e.g. pre-2.13)
76+
}
77+
}
6878
)
6979
.jvmPlatform(
7080
scalaVersions = Seq(Scala212, Scala213, Scala3),
@@ -79,16 +89,6 @@ lazy val runtime = (projectMatrix in file("scalapb-runtime"))
7989
Compile / PB.protoSources := Seq(
8090
(LocalRootProject / baseDirectory).value / "protobuf"
8191
),
82-
scalacOptions ++= {
83-
CrossVersion.partialVersion(scalaVersion.value) match {
84-
case Some((2, _)) =>
85-
Seq(
86-
"-Wconf:msg=[Uu]nused&origin=scala[.]collection[.]compat._:s",
87-
"-Wconf:cat=deprecation&msg=.*[Jj]avaGenerateEqualsAndHash.*deprecated.*:s"
88-
)
89-
case _ => Seq.empty // Scala 2.12 or other (e.g. pre-2.13)
90-
}
91-
}
9292
)
9393
)
9494
.jsPlatform(

0 commit comments

Comments
 (0)