+build Add sort imports support. (#28780)
* Add scalafix plugin for jdk 9. * Add command alias sortImports. * Excludes some sources from SortImports. * Update SortImports to 0.4.0 * Sort imports with `sortImports` command.
This commit is contained in:
parent
ea7205eaf7
commit
0e4d41ad33
1534 changed files with 7454 additions and 6165 deletions
20
project/ScalaFixForJdk9Plugin.scala
Normal file
20
project/ScalaFixForJdk9Plugin.scala
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (C) 2020 Lightbend Inc. <https://www.lightbend.com>
|
||||
*/
|
||||
|
||||
package akka
|
||||
|
||||
import sbt.{AutoPlugin, PluginTrigger, Plugins, ScalafixSupport}
|
||||
import scalafix.sbt.ScalafixPlugin
|
||||
object ScalaFixForJdk9Plugin extends AutoPlugin with ScalafixSupport{
|
||||
override def trigger: PluginTrigger = allRequirements
|
||||
import Jdk9._
|
||||
override def requires: Plugins = Jdk9 && ScalafixPlugin
|
||||
|
||||
import ScalafixPlugin.autoImport.scalafixConfigSettings
|
||||
import sbt._
|
||||
override def projectSettings: Seq[Def.Setting[_]] = super.projectSettings ++ {
|
||||
inConfig(TestJdk9)(scalafixConfigSettings(TestJdk9)) ++
|
||||
inConfig(CompileJdk9)(scalafixConfigSettings(CompileJdk9))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue