Scala on Android

The comprehensive documentation

  • Information reliability Sustainable Won't become outdated
  • Last edit Fri Jul 10 19:44:32 2015 +0200
  • Edit on GitHub

Build Tool

You need to decide which build tool should manage your dependencies, compile and deploy your application and deliver your signed APKs. The most popular solutions are sbt and Gradle. Both tools have a community developed plugin for Scala on Android development.

  • Information reliability Fragile Might become outdated very soon
  • Last edit Fri Jul 10 19:44:32 2015 +0200
  • Edit on GitHub


(Android SDK Plugin for SBT)
Mixed Scala and Java projectsYesYes
Linting (limited to bytecode)YesNo
ProGuard cachingYesUnknown
Continuous compilationYesNo *
Scala compiler plugins (e.g. macro paradise)YesNo *
Custom annotation processingNoNo

sbt and Gradle, and their respective plugins for Scala on Android, are reliable and mature tools. Pointing the finger on one of them and declaring it as the better choice is not possible from an objective point of view. Gradle on one hand is the default build system for Android. It works well with Android Studio and there is plenty of documentation for Android specific niceties. sbt on the other hand is the standard build tool for Scala. It is written in Scala and also configured by the user in this language. sbt comes with advanced features to leverage the capabilities of this ecosystem.

At the end of the day the choice of whether to use sbt or Gradle is a matter of taste and previous experiences. Measured by GitHub stars and commits, the Android SDK Plugin for SBT is the more popular tool. For this very reason, this documentation is focusing on sbt and contains several chapters that are specific to this setup. It is therefore advised to take the sbt path in order to follow further instructions.

Further reading