Even following a configuration from project tests (
https://github.com/pfn/android-sdk-plugin/blob/master/sbt-test/android-sdk-plugin/multiproject-lib-with-resources/project/build.scala)
fails with the same issue:
import sbt._
import sbt.Keys._
import android.Keys._
import android.Dependencies.LibraryProject
object FooBarBazBuild extends Build {
lazy val bar = project in(file("foo/bar")) settings(appSettings: _*)
dependsOn(baz) aggregate(baz)
lazy val baz = project settings (android.Plugin.androidBuildApklib: _*)
lazy val appSettings = android.Plugin.androidBuild(baz) ++
List(
localProjects in Android += LibraryProject(baz.base),
platformTarget in Android := "android-19",
apkbuildExcludes in Android ++= Seq("META-INF/LICENSE.txt",
"META_INF/NOTICE.txt")
)
}
There's a dexInputs key it looks like I could use to filter out the dup
classes.jar but that's still not addressing whatever is going on here.
On Fri, Jan 10, 2014 at 4:02 PM, Daniel Skinner <[email protected]> wrote:
> import sbt._
> import sbt.Keys._
>
> import android.Keys._
>
> object FooBarBazBuild extends Build {
>
> lazy val bar = project in(file("foo/bar")) settings(common: _*)
> dependsOn(baz) aggregate(baz)
>
> lazy val baz = project settings (common: _*)
>
> lazy val common = android.Plugin.androidBuild ++ Seq(
> proguardOptions in Android ++= IO.readLines(file("proguard.txt")),
> scalacOptions in Compile ++= Seq("-deprecation", "-feature"),
> javacOptions in Compile += "-deprecation"
> )
>
> }
>
> So here's what ends up happening. project bar is a variant that depends on
> android library baz. When I compile this, it appears that baz is compiled
> twice as noted by deprecation warnings. This also results in bot bar and
> baz both containing the classes from baz after calling task compile. This
> results in all sorts of problem afterwards with the type resource plugin,
> proguard and duplicate classes, etc. This also seems to be in stark
> contrast to a standard sbt build where classes from baz don't end up in
> bar's output.
>
> And in fact, if I look for bar/target/android-bin/classes.jar after task
> compile, its not there. But if I call `android:package-debug`, then the
> classes.jar shows up during that process and eventually causes all the
> problems when this is finally passed in to `dx`. It seems like this should
> not be happening.
>
> using android-sdk-plugin:1.2.5
>
> I wrote a custom build proc last night to help dive into the details and
> I'm guessing I could hook in to the plugin and filter out the classes.jar
> for project bar (since in this case the project only contains resource
> files), but I dont want to tip toe around this issue b/c what if it did
> have classes that needed to be added? Is this an issue with the proguard
> output? or some configuration detail I'm missing?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "scala-on-android" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/scala-on-android/5xDc-7Kodaw/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"scala-on-android" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.