diff --git a/build.sbt b/build.sbt index 506ac29..417f3d4 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,10 @@ lazy val core = project .in(file("core")) .enablePlugins(SbtPlugin) .settings( - name := "sbt-http4s-org" + name := "sbt-http4s-org", + unusedCompileDependenciesFilter -= moduleFilter("org.typelevel", "sbt-typelevel"), + unusedCompileDependenciesFilter -= moduleFilter("org.typelevel", "sbt-typelevel-scalafix"), + unusedCompileDependenciesFilter -= moduleFilter("org.typelevel", "sbt-typelevel-site") ) lazy val docs = project diff --git a/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala b/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala index ea3e5e3..af7fbd2 100644 --- a/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala +++ b/core/src/main/scala/org/http4s/sbt/Http4sOrgPlugin.scala @@ -23,6 +23,7 @@ import sbt.Keys._ import sbt._ import scalafix.sbt.ScalafixPlugin.autoImport._ +import ExplicitDepsPlugin.autoImport._ import GenerativeKeys._ import TypelevelCiPlugin.autoImport._ import TypelevelSonatypePlugin.autoImport._ @@ -35,6 +36,8 @@ object Http4sOrgPlugin extends AutoPlugin { override def buildSettings = publishSettings ++ organizationSettings ++ githubActionsSettings ++ scalafixSettings + override def projectSettings = explicitDepsSettings + lazy val publishSettings: Seq[Setting[_]] = Seq( tlSonatypeUseLegacyHost := false @@ -65,6 +68,11 @@ object Http4sOrgPlugin extends AutoPlugin { githubWorkflowBuildMatrixFailFast := Some(false) ) + lazy val explicitDepsSettings: Seq[Setting[_]] = + Seq( + unusedCompileDependenciesFilter -= moduleFilter("org.typelevel", "scalac-compat-annotation") + ) + lazy val scalafixSettings: Seq[Setting[_]] = Seq( scalafixScalaBinaryVersion := (LocalRootProject / scalaBinaryVersion).value,