Created
July 2, 2025 06:40
-
-
Save xuwei-k/e217e0cef6a4541321ffa3cbafb8680e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import sbt.Keys._ | |
import scalafix.sbt.ScalafixPlugin | |
import scalafix.sbt.ScalafixPlugin.autoImport.ScalafixConfig | |
/** | |
* [[https://xuwei-k.hatenablog.com/entry/2025/03/11/214521]] | |
*/ | |
object MyScalafixPlugin extends AutoPlugin { | |
override def trigger: PluginTrigger = | |
allRequirements | |
override def requires: Plugins = | |
ScalafixPlugin | |
override def projectSettings: Seq[Def.Setting[?]] = Def.settings( | |
ScalafixConfig / products ++= ( | |
(LocalProject("scalafixRules") / Compile / externalDependencyClasspath).value.map(_.data) | |
), | |
ScalafixConfig / products += { | |
(LocalProject("scalafixRules") / Compile / packageBin).value | |
} | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment