pfn/android-sdk-plugin — pull request #36 by aij (2014-01-31 22:47:55+00:00)
Title: Add TypedActivity and fix compatibility issues with preinstalled modules

I'm converting a project from jberkel/android-plugin to use your android-sdk-plugin and ran into a few problems.

First of all, once I got my sbt configs to compile, my Activities wouldn't compile because they extend TypedActivity. I could have defined my own, but it seemed better to improve compatibility here so other's wouldn't have to do the same.

Next, the proguard caching stuff was breaking as it was trying to read a classes directory as if it were a .jar. I worked around that with an if (false) initially, but changed it to be a little cleaner for now.

Last of all, proguard was breaking because it thought library classes were depending on program classes. The problem turned out to be caused by android-sdk-plugin passing commons-logging and httpcore jars to proguard. (They were fetched as dependencies of httpmime.) You could probalby reproduce the problem in other projects by adding

libraryDependencies += "org.apache.httpcomponents" % "httpmime" % "4.1"

(Yes, yes, I realize now that I should be moving away from the apache http client)

I worked around that by copying android-plugin's list of preinstalled modules, which should help anyone else using libraries that depend on those modules.

So now my code compiles at least. :) I'll see about getting the proguard caching to work later on.