jberkel / android-plugin

An sbt plugin for Android development in Scala
https://groups.google.com/forum/#!forum/scala-on-android
Other
476 stars 113 forks source link

If apache http classes are referenced, they should be stripped in proguard #111

Closed geeksville closed 12 years ago

geeksville commented 12 years ago

Because the android runtime includes classes with the same names (and likely same functionality). Here's the way I fixed it for just my project:

(from my SBT Build.scala)

// The following packages should be excluded from android builds proguardExclude in Android <<= (proguardExclude in Android, fullClasspath in Runtime) map { (inherited, cp) => val cp: PathFinder = cp.files val excluded = (cp * "httpclient-_.jar") +++ (cp "httpcore-.jar") +++ (cp "commons-logging-.jar") +++ (cp _ "commons-io-*.jar") get

  inherited ++ excluded
}
jberkel commented 12 years ago

i think this is fixed in jberkel/android-plugin@fac626c20, please verify. you should not need any special excludes anymore.

geeksville commented 12 years ago

Thanks Jan - it will be a couple of weeks before I can try it, but I'll let you know.

jberkel commented 12 years ago

ok, i'll close it for now, reopen if there are still problems