I have created a demo application with the sbt android-plugin.
The app is very simple.
I have placed a MainActivity.java
file under /src/main/java/my/package/
and when a button is pressed it takes you to a second Activity
but done in Scala
.
Everything is working fine but the build times are killing me. When I modify something I run in my device using:
> android:package-debug
> android:start-device
My issue is that it takes almost a complete minute to build a two activities project. Is there another way to compile and run?
This is my output of android:package-debug
> android:package-debug [info] Wrote /Users/macarse/Documents/demo/target/src_managed/main/scala/my/package/TR.scala [info] Compiling 1 Scala source to /Users/macarse/Documents/demo/target/scala-2.9.0-1/classes... ProGuard, version 4.6 ProGuard is released under the GNU General Public License. You therefore must ensure that programs that link to it (scala, ...) carry the GNU General Public License as well. Alternatively, you can apply for an exception with the author of ProGuard. Reading program directory [/Users/macarse/Documents/demo/target/scala-2.9.0-1/classes] Reading program jar [/Users/macarse/.sbt/boot/scala-2.9.0-1/lib/scala-library.jar] (filtered) Reading library jar [/Users/macarse/Documents/android-sdk-mac_86/platforms/android-4/android.jar] Note: You're ignoring all warnings! Preparing output jar [/Users/macarse/Documents/demo/target/classes.min.jar] Copying resources from program directory [/Users/macarse/Documents/demo/target/scala-2.9.0-1/classes] Copying resources from program jar [/Users/macarse/.sbt/boot/scala-2.9.0-1/lib/scala-library.jar] (filtered) [info] Dexing /Users/macarse/Documents/demo/target/classes.dex [info] Packaging /Users/macarse/Documents/demo/target/demo-0.1.apk [success] Total time: 56 s, completed Oct 29, 2011 4:22:54 PM
There are a couple of options:
There is also a project called treeshaker for Eclipse which is a lot faster than proguard, but it is not integrated w/ the sbt plugin yet.