Skip to content

Commit

Permalink
fix tlVersionIntroduced for native cross-projects
Browse files Browse the repository at this point in the history
  • Loading branch information
satorg committed May 2, 2024
1 parent 3660c1c commit a4068f4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ lazy val commonJsSettings = Seq(
)

Global / concurrentRestrictions += Tags.limit(NativeTags.Link, 1)
lazy val commonNativeSettings = Seq(

// Cats 2.11.0 switches to Scala Native 0.5.
// Therefore `tlVersionIntroduced` should be reset to 2.11.0 for all scala versions in all native cross-projects.
val commonNativeTlVersionIntroduced = List("2.12", "2.13", "3").map(_ -> "2.11.0").toMap

lazy val commonNativeSettings = Seq[Setting[?]](
doctestGenTests := Seq.empty,
tlVersionIntroduced ++= List("2.12", "2.13").map(_ -> "2.4.0").toMap + ("3" -> "2.8.0")
tlVersionIntroduced := commonNativeTlVersionIntroduced
)

lazy val disciplineDependencies = Seq(
Expand Down Expand Up @@ -127,8 +132,10 @@ lazy val algebraSettings = Seq[Setting[?]](
)

lazy val algebraNativeSettings = Seq[Setting[?]](
tlMimaPreviousVersions ~= (_ - "2.2.3"),
tlVersionIntroduced += ("3" -> "2.8.0")
// Reset to auto-populate from `tlVersionIntroduced` below.
tlMimaPreviousVersions := Set.empty,
// Should be reset to the common setting value, because `algebraSettings` re-defines it.
tlVersionIntroduced := commonNativeTlVersionIntroduced
)

lazy val algebra = crossProject(JSPlatform, JVMPlatform, NativePlatform)
Expand Down

0 comments on commit a4068f4

Please sign in to comment.