The path from SBT to Scala-IDE is well described in many places:
What is the reverse for this? If I start a new project in Scala-IDE, can I just add a build.sbt file and somehow tell Eclipse to use this when running the application?
Apologies if this seems obvious to some, but I've recently moved from ItelliJ Idea to Scala-IDE and I'm not certain about setting up Scala-IDE to use SBT and my sbt config files.
sbt's Scala versionsbt needs Scala jars to run itself since it is written in Scala. sbt uses that same version of Scala to compile the build definitions that you write for your project because they use sbt APIs.
To import the Scala IDE in your workspace simply click on File > Import. The Eclipse Import dialog will open. There, select General > Existing Projects into Workspace and click Next. A new dialog will open.
If you call scala, you will get whatever scala version is installed on the path of your operating system. If you call sbt console, you get the scala version configured in the sbt build (build. sbt) with all libraries that are used in the build already on the classpath.
No, you cannot do this. The way to do it is as you described. Then, whenever you make changes to build.sbt (e.g., new jar dependency), rerun the eclipse
command from sbt and refresh the project in Eclipse so that the newly generated files are reloaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With