Can we generate a .sbt file from an existing IntelliJ project?
Relatively new to Scala, and completely new to SBT, I have nonetheless a mid-sized project which also uses a bunch of libraries.
I'd like to move it to be a SBT project (mostly, as I want to manage the external dependencies maven-like from repos).
Is it possible to invoke some magic incantation in IntelliJ so that it generates the build.sbt file?
I can probably figure out how to reverse-engineer it, but I'm guessing having it done for me would also be good for me to study how it's done.
请先登录再写评论。
To create a build.sbt is quite easy if you depart from some valid template.
And then adding each dependency is just one line per lib:
libraryDependencies ++= Seq(
"org.scaloid" %% "scaloid" % "3.2.1-8",
"org.scala-lang" % "scala-library" % "2.10.3",
"com.android.support" % "appcompat-v7" % "18.+",
"com.google.android.gms" % "play-services" % "4.2.42",
"ch.acra" % "acra" % "4.5.0",
"com.google.maps.android" % "android-maps-utils" % "0.3"
)
Scala plugin has SBT new project wizard. Try using: File -> New Project... -> Scala -> SBT Project.
It will generate very simple SBT project.
Best regards,
Alexander Podkhalyuzin.