Assume I have a library a.com. Everytime and in each file, I need to import a lot of package like
import a.com._
import a.com.b._
import a.com.c
import a.com.Implicits._
I don't want to write these code every time in each file of another project.
Also if I want to change a.com
to a.net
, I have to change every file.
Is there anyway to prevent this?
You can generate sources
build.sbt
project/build.sbt
project/Generator.scala
project/Transformer.scala
in/src/main/scala/com/example/App.scala
out/target/scala-2.13/src_managed/main/scala/com/example/App.scala (after
sbt "; project out; clean; compile"
)