Scala Ide Sbt

Posted on  by admin

You can develop your project just in plain editor and command line, but we recommend usingIntellij IDEA while developing.

Sbt
  • Build.sbt is a Scala-based DSL to express parallel processing task graph. Typos in build.sbt will be caught as a compilation error.
  • Next, open a directory containing your Scala code. The extension activates when the main directory contains build.sbt or build.sc file, a Scala file is opened, which includes.sbt,.scala and.sc file, or a standard Scala directory structure src/main/scala is detected. Importing a build.
  • Make sure you have Android SDK fully upgraded and installed.
  • On Intellij main screen go to Configure > Plugins
  • Make sure you have Android Support enabled and click on Install JetBrains plugin...
Scala Ide Sbt

<img class=”img-thumbnail” width=”640” height=”480”alt=”Configure Plugins” src=”/resources/img/intellij02.png”>

To use the sbt shell for build and import procedures, select the Use sbt shell section located in the sbt settings and perform steps described in the Run a Scala application using the sbt shell section. The sbt versions 0.13.16.+ / 1.0.3.+ are recommended. To use the sbt shell for debugging, refer to the debugging with sbt shell section.

Scala Sbt Project

  • Find Scala plugin and install it.
  • For the best integration with Android project it’s recommended to install sbt plugin for Intellij, click on Browse repositories button and intall sbt plugin.

Installing Scala and sbt plugins will require Intellij restart, after that you can simply import project as sbt project.

Sbt scala tutorial
  • Set Android Sdk for while importing project
Ide

When downloading dependencies and indexing is done, add new Android Applicatication configuration. Remove sbt taskand put android:package as task to run.

Sbt Scala Version

You should now have support for Java and Scala support in your Android project using sbt as build system.