diff --git a/project/CatsEffectForkPlugin.scala b/project/CatsEffectForkPlugin.scala new file mode 100644 index 0000000..d5f2e92 --- /dev/null +++ b/project/CatsEffectForkPlugin.scala @@ -0,0 +1,20 @@ +import sbt.* +import sbt.Keys.* + +/** + * Automatically enriches projects with the following settings (despite the word "override"). + */ +object CatsEffectForkPlugin extends AutoPlugin { + + /** + * Thus plug-in will automatically be enabled; it has no requirements. + */ + override def trigger: PluginTrigger = + AllRequirements + + // cats-effect prefers to run in its own main thread + // https://github.com/typelevel/cats-effect/pull/3774 + override val buildSettings: Seq[Setting[_]] = Seq( + fork := true + ) +}