Skip to content

Instantly share code, notes, and snippets.

@jberkel
Created July 17, 2011 17:19
Show Gist options
  • Save jberkel/1087819 to your computer and use it in GitHub Desktop.
Save jberkel/1087819 to your computer and use it in GitHub Desktop.
sbt-android-pluging config example
// sbt 0.7.x
import sbt._
trait Defaults extends BaseAndroidProject {
def androidPlatformName = "android-7"
// no proguarded needed!
override def skipProguard = true
}
class Parent(info: ProjectInfo) extends ParentProject(info) {
override def shouldCheckOutputDirectories = false
override def updateAction = task { None }
lazy val main = project(".", "foo", new MainProject(_))
lazy val tests = project("tests", "tests", new TestProject(_), main)
class MainProject(info: ProjectInfo) extends AndroidProject(info) with Defaults with MarketPublish with TypedResources {
val keyalias = "change-me"
}
class TestProject(info: ProjectInfo) extends AndroidTestProject(info) with Defaults
}
// sbt 0.1x
object AndroidBuild extends Build {
// MainProject
lazy val app = Project (
"test",
file("."),
settings = General.androidFullProjectSettings ++ Seq (
keyalias in Android := "jberkel",
useProguard in Android := false,
) ++ AndroidInstall.settings
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment