diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 243f8705f..d113dfb3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,11 +67,11 @@ jobs: - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: mkdir -p core/target/js-2.12 scala-futures/target/jvm-2.12 twitter-futures/target/twitter-22.4.0-jvm-2.12 .finagle-tagless-scalafix-latest/target/twitter-22.7.0-jvm-2.12 scalafix/rules/target/twitter-22.4.0-jvm-2.12 scalafix/rules/target/twitter-22.7.0-jvm-2.12 twitter-futures/target/twitter-22.7.0-jvm-2.12 scalafix/rules/target/twitter-22.4.0-jvm-2.13 scala-futures/target/jvm-2.13 .finagle-tagless-scalafix-latest/target/twitter-22.7.0-jvm-2.13 .async-utils-finagle-latest/target/twitter-22.7.0-jvm-2.12 core/target/jvm-2.13 .async-utils-twitter-latest/target/twitter-22.7.0-jvm-2.12 finagle-natchez/target/twitter-22.7.0-jvm-2.13 .async-utils-finagle-latest/target/twitter-22.7.0-jvm-2.13 twitter-finagle/target/twitter-22.7.0-jvm-2.13 twitter-futures/target/twitter-22.7.0-jvm-2.13 twitter-futures/target/twitter-22.4.0-jvm-2.13 .async-utils-twitter-latest/target/twitter-22.7.0-jvm-2.13 scala-futures/target/js-2.12 finagle-natchez/target/twitter-22.4.0-jvm-2.12 twitter-finagle/target/twitter-22.7.0-jvm-2.12 twitter-finagle/target/twitter-22.4.0-jvm-2.12 finagle-natchez/target/twitter-22.7.0-jvm-2.12 core/target/jvm-2.12 finagle-natchez/target/twitter-22.4.0-jvm-2.13 .async-utils-finagle-natchez-latest/target/twitter-22.7.0-jvm-2.13 scala-futures/target/js-2.13 twitter-finagle/target/twitter-22.4.0-jvm-2.13 .async-utils-finagle-natchez-latest/target/twitter-22.7.0-jvm-2.12 scalafix/rules/target/twitter-22.7.0-jvm-2.13 core/target/js-2.13 project/target + run: mkdir -p core/target/js-2.12 scala-futures/target/jvm-2.12 .finagle-tagless-scalafix-latest/target/twitter-22.12.0-jvm-2.13 .async-utils-finagle-natchez-latest/target/twitter-22.12.0-jvm-2.12 finagle-natchez/target/twitter-22.12.0-jvm-2.13 scalafix/rules/target/twitter-22.12.0-jvm-2.12 twitter-finagle/target/twitter-22.12.0-jvm-2.12 twitter-futures/target/twitter-22.4.0-jvm-2.12 scalafix/rules/target/twitter-22.4.0-jvm-2.12 .async-utils-finagle-latest/target/twitter-22.12.0-jvm-2.12 finagle-natchez/target/twitter-22.12.0-jvm-2.12 scalafix/rules/target/twitter-22.7.0-jvm-2.12 twitter-futures/target/twitter-22.7.0-jvm-2.12 scalafix/rules/target/twitter-22.4.0-jvm-2.13 scala-futures/target/jvm-2.13 twitter-futures/target/twitter-22.12.0-jvm-2.12 core/target/jvm-2.13 finagle-natchez/target/twitter-22.7.0-jvm-2.13 .async-utils-twitter-latest/target/twitter-22.12.0-jvm-2.13 twitter-futures/target/twitter-22.12.0-jvm-2.13 twitter-finagle/target/twitter-22.7.0-jvm-2.13 twitter-futures/target/twitter-22.7.0-jvm-2.13 twitter-futures/target/twitter-22.4.0-jvm-2.13 scala-futures/target/js-2.12 finagle-natchez/target/twitter-22.4.0-jvm-2.12 twitter-finagle/target/twitter-22.7.0-jvm-2.12 twitter-finagle/target/twitter-22.4.0-jvm-2.12 finagle-natchez/target/twitter-22.7.0-jvm-2.12 core/target/jvm-2.12 .finagle-tagless-scalafix-latest/target/twitter-22.12.0-jvm-2.12 scalafix/rules/target/twitter-22.12.0-jvm-2.13 finagle-natchez/target/twitter-22.4.0-jvm-2.13 scala-futures/target/js-2.13 twitter-finagle/target/twitter-22.4.0-jvm-2.13 twitter-finagle/target/twitter-22.12.0-jvm-2.13 scalafix/rules/target/twitter-22.7.0-jvm-2.13 .async-utils-finagle-natchez-latest/target/twitter-22.12.0-jvm-2.13 .async-utils-finagle-latest/target/twitter-22.12.0-jvm-2.13 .async-utils-twitter-latest/target/twitter-22.12.0-jvm-2.12 core/target/js-2.13 project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') - run: tar cf targets.tar core/target/js-2.12 scala-futures/target/jvm-2.12 twitter-futures/target/twitter-22.4.0-jvm-2.12 .finagle-tagless-scalafix-latest/target/twitter-22.7.0-jvm-2.12 scalafix/rules/target/twitter-22.4.0-jvm-2.12 scalafix/rules/target/twitter-22.7.0-jvm-2.12 twitter-futures/target/twitter-22.7.0-jvm-2.12 scalafix/rules/target/twitter-22.4.0-jvm-2.13 scala-futures/target/jvm-2.13 .finagle-tagless-scalafix-latest/target/twitter-22.7.0-jvm-2.13 .async-utils-finagle-latest/target/twitter-22.7.0-jvm-2.12 core/target/jvm-2.13 .async-utils-twitter-latest/target/twitter-22.7.0-jvm-2.12 finagle-natchez/target/twitter-22.7.0-jvm-2.13 .async-utils-finagle-latest/target/twitter-22.7.0-jvm-2.13 twitter-finagle/target/twitter-22.7.0-jvm-2.13 twitter-futures/target/twitter-22.7.0-jvm-2.13 twitter-futures/target/twitter-22.4.0-jvm-2.13 .async-utils-twitter-latest/target/twitter-22.7.0-jvm-2.13 scala-futures/target/js-2.12 finagle-natchez/target/twitter-22.4.0-jvm-2.12 twitter-finagle/target/twitter-22.7.0-jvm-2.12 twitter-finagle/target/twitter-22.4.0-jvm-2.12 finagle-natchez/target/twitter-22.7.0-jvm-2.12 core/target/jvm-2.12 finagle-natchez/target/twitter-22.4.0-jvm-2.13 .async-utils-finagle-natchez-latest/target/twitter-22.7.0-jvm-2.13 scala-futures/target/js-2.13 twitter-finagle/target/twitter-22.4.0-jvm-2.13 .async-utils-finagle-natchez-latest/target/twitter-22.7.0-jvm-2.12 scalafix/rules/target/twitter-22.7.0-jvm-2.13 core/target/js-2.13 project/target + run: tar cf targets.tar core/target/js-2.12 scala-futures/target/jvm-2.12 .finagle-tagless-scalafix-latest/target/twitter-22.12.0-jvm-2.13 .async-utils-finagle-natchez-latest/target/twitter-22.12.0-jvm-2.12 finagle-natchez/target/twitter-22.12.0-jvm-2.13 scalafix/rules/target/twitter-22.12.0-jvm-2.12 twitter-finagle/target/twitter-22.12.0-jvm-2.12 twitter-futures/target/twitter-22.4.0-jvm-2.12 scalafix/rules/target/twitter-22.4.0-jvm-2.12 .async-utils-finagle-latest/target/twitter-22.12.0-jvm-2.12 finagle-natchez/target/twitter-22.12.0-jvm-2.12 scalafix/rules/target/twitter-22.7.0-jvm-2.12 twitter-futures/target/twitter-22.7.0-jvm-2.12 scalafix/rules/target/twitter-22.4.0-jvm-2.13 scala-futures/target/jvm-2.13 twitter-futures/target/twitter-22.12.0-jvm-2.12 core/target/jvm-2.13 finagle-natchez/target/twitter-22.7.0-jvm-2.13 .async-utils-twitter-latest/target/twitter-22.12.0-jvm-2.13 twitter-futures/target/twitter-22.12.0-jvm-2.13 twitter-finagle/target/twitter-22.7.0-jvm-2.13 twitter-futures/target/twitter-22.7.0-jvm-2.13 twitter-futures/target/twitter-22.4.0-jvm-2.13 scala-futures/target/js-2.12 finagle-natchez/target/twitter-22.4.0-jvm-2.12 twitter-finagle/target/twitter-22.7.0-jvm-2.12 twitter-finagle/target/twitter-22.4.0-jvm-2.12 finagle-natchez/target/twitter-22.7.0-jvm-2.12 core/target/jvm-2.12 .finagle-tagless-scalafix-latest/target/twitter-22.12.0-jvm-2.12 scalafix/rules/target/twitter-22.12.0-jvm-2.13 finagle-natchez/target/twitter-22.4.0-jvm-2.13 scala-futures/target/js-2.13 twitter-finagle/target/twitter-22.4.0-jvm-2.13 twitter-finagle/target/twitter-22.12.0-jvm-2.13 scalafix/rules/target/twitter-22.7.0-jvm-2.13 .async-utils-finagle-natchez-latest/target/twitter-22.12.0-jvm-2.13 .async-utils-finagle-latest/target/twitter-22.12.0-jvm-2.13 .async-utils-twitter-latest/target/twitter-22.12.0-jvm-2.12 core/target/js-2.13 project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') diff --git a/project/AsyncUtilsBuildPlugin.scala b/project/AsyncUtilsBuildPlugin.scala index 73d5926e1..1d2a64145 100644 --- a/project/AsyncUtilsBuildPlugin.scala +++ b/project/AsyncUtilsBuildPlugin.scala @@ -51,12 +51,13 @@ object AsyncUtilsBuildPlugin extends AutoPlugin { .flatMap(_.componentProjects) } - private val currentTwitterVersion = Version("22.7.0").get + private val currentTwitterVersion = Version("22.12.0").get // When a new version is released, move what was previously the current version into the list of old versions. // This plugin will automatically release a new suffixed artifact that can be used by users with bincompat issues. // Don't forget to regenerate the GitHub Actions workflow by running the `githubWorkflowGenerate` sbt task. private val oldVersions = List( + "22.7.0", "22.4.0", ) .flatMap(Version(_)) @@ -151,6 +152,16 @@ object AsyncUtilsBuildPlugin extends AutoPlugin { ) .dependsOn(`async-utils`) + private def pickTlVersionIntroduced(v: Version): Setting[Map[String, String]] = + tlVersionIntroduced := { + v match { + case Version(22, 12, Some(0), None) => + Map("2.12" -> "1.2.0", "2.13" -> "1.2.0") + case v if v <= Version(22, 7, Some(0), None) => + Map("2.12" -> "1.1.0", "2.13" -> "1.1.0") + } + } + private lazy val `async-utils-twitter` = projectMatrixForSupportedTwitterVersions("async-utils-twitter", "twitter-futures") { v => List( @@ -162,7 +173,7 @@ object AsyncUtilsBuildPlugin extends AutoPlugin { ) ++ (if (scalaVersion.value.startsWith("2")) scala2CompilerPlugins else Nil) }, mimaPreviousArtifacts += organizationName.value %% name.value % "0.3.0", - tlVersionIntroduced := Map("2.12" -> "1.1.0", "2.13" -> "1.1.0"), + pickTlVersionIntroduced(v), ) } .dependsOn(`async-utils-core`) @@ -177,7 +188,7 @@ object AsyncUtilsBuildPlugin extends AutoPlugin { ) ++ (if (scalaVersion.value.startsWith("2")) scala2CompilerPlugins else Nil) }, mimaPreviousArtifacts += organizationName.value %% name.value % "0.3.0", - tlVersionIntroduced := Map("2.12" -> "1.1.0", "2.13" -> "1.1.0"), + pickTlVersionIntroduced(v), ) } .dependsOn(`async-utils-twitter`) @@ -196,7 +207,7 @@ object AsyncUtilsBuildPlugin extends AutoPlugin { ) ++ (if (scalaVersion.value.startsWith("2")) scala2CompilerPlugins else Nil) }, mimaPreviousArtifacts += organizationName.value %% name.value % "0.3.0", - tlVersionIntroduced := Map("2.12" -> "1.1.0", "2.13" -> "1.1.0"), + pickTlVersionIntroduced(v), ) } .dependsOn(`async-utils-finagle`) @@ -214,7 +225,7 @@ object AsyncUtilsBuildPlugin extends AutoPlugin { _.filterNot(_ == "-Xfatal-warnings") }, mimaPreviousArtifacts += organizationName.value %% name.value % "0.3.0", - tlVersionIntroduced := Map("2.12" -> "1.1.0", "2.13" -> "1.1.0"), + pickTlVersionIntroduced(v), ) }