Created
July 23, 2011 20:36
-
-
Save philcali/1101854 to your computer and use it in GitHub Desktop.
sbt 10.x multiple android project example definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
import AndroidKeys._ | |
// General object adds all modular android settings appropriately | |
object General { | |
val settings = Defaults.defaultSettings ++ Seq ( | |
version := "0.1.0", | |
organization := "my.android.project" | |
) | |
val androidSettings = | |
settings ++ | |
Seq ( | |
platformName in Android := "android-10" | |
) | |
val androidProjectSettings = | |
androidSettings ++ | |
AndroidProject.androidSettings | |
val androidFullProjectSettings = | |
androidProjectSettings ++ | |
TypedResources.settings ++ | |
AndroidMarketPublish.settings | |
} | |
// Here begins the actual build configuration | |
object AndroidBuild extends Build { | |
// Root project and can list, start, and stop emulators | |
// (along with any other project), but can run compile | |
// to compile all projects | |
lazy val root = Project ( | |
"root", | |
file("."), | |
settings = General.settings | |
) aggregate (app, tests) | |
// MainProject | |
lazy val app = Project ( | |
"app", | |
file("app"), | |
settings = General.androidFullProjectSettings ++ Seq ( | |
keyalias in Android := "change-me", | |
libraryDependencies += "org.scalatest" % "scalatest" % "1.3" | |
) | |
) dependsOn myAndroidLib | |
// AndroidLibraryProject | |
lazy val myAndroidLib = Project ( | |
"library", | |
file("library"), | |
settings = General.androidSettings ++ AndroidBase.settings | |
) | |
// AndroidTestProject | |
lazy val tests = Project ( | |
"tests", | |
file("tests"), | |
settings = General.androidProjectSettings ++ Seq ( | |
proguardInJars in Android := List[File]() | |
) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment