Last active
December 21, 2015 02:49
-
-
Save pfn/6238004 to your computer and use it in GitHub Desktop.
Load an arbitrary project from git, include it as an Android Library Project in our main application build.
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 android.ArbitraryProject | |
object SampleBuild extends Build { | |
import android.Keys._ | |
import android.Dependencies.LibraryProject | |
// we're gonna pull tag android-sdk-support_r11 from the support repo | |
val supportGit = uri("https://android.googlesource.com/" + | |
"platform/frameworks/support.git#android-sdk-support_r11") | |
val volleyBase = ArbitraryProject.git(supportGit) / "volley" | |
lazy val volleySettings = android.Plugin.androidBuild ++ Seq( | |
platformTarget in Android := "android-17", | |
libraryProject in Android := true | |
) | |
override def buildLoaders = ArbitraryProject.settingsLoader( | |
Map(volleyBase -> volleySettings)) | |
lazy val volley = RootProject(volleyBase) | |
lazy val root = Project(id="sample", base=file(".")) settings( | |
android.Plugin.androidBuild ++ Seq( | |
platformTarget in Android := "android-17", | |
localProjects in Android += LibraryProject(volleyBase) | |
) | |
:_*) dependsOn(volley) aggregate(volley) | |
} | |
// vim: set ts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment