Skip to content

Instantly share code, notes, and snippets.

@pfn
Last active December 19, 2015 00:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfn/5872691 to your computer and use it in GitHub Desktop.
Save pfn/5872691 to your computer and use it in GitHub Desktop.
Simple scala android project build example. It only takes one line in build.sbt to do what's necessary. Everything else is optional.
// so we can use keywords from Android, such as 'Android' and 'proguardOptions'
import android.Keys._
// load the android plugin into the build
android.Plugin.androidBuild
// project name, completely optional
name := "time-widgets"
// pick the version of scala you want to use
scalaVersion := "2.10.2"
// scala 2.10 flag for feature warnings
scalacOptions in Compile += "-feature"
// for non-ant-based projects, you'll need this for the specific build target:
platformTarget in Android := "android-17"
// call install and run without having to prefix with android:
run <<= run in Android
install <<= install in Android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment