Add the scalafix plugin to your build definition. For sbt:
// project/plugins.sbt
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.17")
Start the sbt shell and run the following commands:
// sbt shell
scalafixEnable
scalafix dependency:[email protected]:to-1-0-0:1.0.0 --files .
The rule applies the following changes:
- rename references to package
endpoints
toendpoints4s
, - update imports of
endpoints.algebra.Codec
toendpoints4s.Codec
, - rewrite constructor calls of
EndpointDocs
andCallbackDocs
to avoid deprecations, - bump version number in build dependencies from
0.15.0
to1.0.0
, - update modules organization from
org.julienrf
toorg.endpoints4s
, - update artifact names to remove the
endpoints-
prefix.
Note that the rules sometimes overlap or might be incomplete. You will probably have to do some manual edits.
To develop rule:
sbt ~to-1_0_0-tests/test
# edit to-1.0.0/rules/src/main/scala/fix/To_1_0_0.scala