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

Adding local jar #139

Closed mads-hartmann closed 12 years ago

mads-hartmann commented 12 years ago

Hi,

Is it possible to add a local jar dependency to an android project such that it gets copied into the apk file? I want to add the jar file produced by a sub-project to the final apk. file.

The issue seems to be related to #58 but adding

proguardInJars in Android += file("...")

Doesn't seem to fix the problem. I still get java.lang.NoClassDefFoundError: com.sidewayscoding.TextService. The project is on github here

Thanks, Mads Hartmann Jensen

lyricallogical commented 12 years ago

Try this

  lazy val fullAndroidSettings =
    settings ++ 
    AndroidProject.androidSettings ++
    AndroidMarketPublish.settings ++
    PlainJavaProject.settings ++ 
    Seq (autoScalaLibrary := true, useProguard in Android := true)

In multi project, PlainJavaProject.settings is fragile.

mads-hartmann commented 12 years ago

it works! Thanks a lot!