Created
October 18, 2013 22:39
-
-
Save pfn/7049299 to your computer and use it in GitHub Desktop.
example build.sbt for a single project with many library projects
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 android.Keys._ | |
android.Plugin.androidBuild | |
name := "project-with-lib-projects" | |
unmanagedClasspath in Compile <<= ( baseDirectory | |
, unmanagedClasspath in Compile) map { | |
(base,cp) => | |
val ignores = Set("android-support-v4.jar", "guava-14.0.1.jar") | |
(cp filterNot (c => ignores(c.data.getName))) ++ Seq( | |
Attributed.blank(base / "libs" / "android-support-v4.jar"), | |
Attributed.blank(base / "libs" / "guava-14.0.1.jar") | |
) | |
} | |
proguardConfig in Android ~= { pc => "-dontwarn com.google.common.**" +: | |
pc filterNot { _ contains "jsr305" }} | |
commands += Command.command("proguard")(st => { | |
val extracted = Project.extract(st) | |
Project.runTask(packageT in Android, | |
extracted.append(Seq( | |
useProguard in Android := true, | |
useProguardInDebug in Android := true | |
), st) | |
) | |
st | |
}) | |
run <<= run in Android |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment