- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Scala and Android 1.5
Thu, 2009-06-11, 05:49
I am working on an article on using Scala on Android. I had seen descriptions
of doing this on this list, as well as on the main Scala site:
http://www.scala-lang.org/node/160. I didn't think it would be too hard to
get the basic mechanisms working based on these results. I wanted to add
some more Scala-ish goodness, similar to how some of the Scala/Swing support
work (use closures for event handlers via implicits, for example.) However I
have had some issues. Android 1.5's ant build is not as easy to customize as
had been done in the past, as most of it is compiled Java now. So I tried to
use the Eclipse style build as in the note on the Scala site. That proved
non-trivial too. Some of the issues I encountered can be seen here:
http://groups.google.com/group/android-developers/browse_thread/thread/d....
So I'm hoping somebody on here can help me get this working.
Thu, 2009-06-11, 08:27
#2
Re: Re: Scala and Android 1.5
use proguard. there were some articles on the net detailing how to do this.
On Thu, Jun 11, 2009 at 3:06 PM, Jesper Nordenberg <megagurka@yahoo.com> wrote:
--
.......__o
.......\<,
....( )/ ( )...
On Thu, Jun 11, 2009 at 3:06 PM, Jesper Nordenberg <megagurka@yahoo.com> wrote:
michaelg wrote:
So I tried to
use the Eclipse style build as in the note on the Scala site. That proved
non-trivial too. Some of the issues I encountered can be seen here:
http://groups.google.com/group/android-developers/browse_thread/thread/d81404181a393a14.
So I'm hoping somebody on here can help me get this working.
To get the scala-library.jar file working I simply unpacked it, removed the scala/testing directory, repacked it and added it as an external Jar file in the Eclipse Android project. It works, but the build times are quite long as the APK file must be rebuilt for each code change.
/Jesper Nordenberg
--
.......__o
.......\<,
....( )/ ( )...
Thu, 2009-06-11, 17:57
#3
Re: Re: Scala and Android 1.5
Thanks Jesper. Did you recompile scala-library.jar using the android-library to change ScalaObject and ScalaBeanInfo as well?
-- Michael
On Thu, Jun 11, 2009 at 12:06 AM, Jesper Nordenberg <megagurka@yahoo.com> wrote:
-- Michael
On Thu, Jun 11, 2009 at 12:06 AM, Jesper Nordenberg <megagurka@yahoo.com> wrote:
michaelg wrote:
So I tried to
use the Eclipse style build as in the note on the Scala site. That proved
non-trivial too. Some of the issues I encountered can be seen here:
http://groups.google.com/group/android-developers/browse_thread/thread/d81404181a393a14.
So I'm hoping somebody on here can help me get this working.
To get the scala-library.jar file working I simply unpacked it, removed the scala/testing directory, repacked it and added it as an external Jar file in the Eclipse Android project. It works, but the build times are quite long as the APK file must be rebuilt for each code change.
/Jesper Nordenberg
Fri, 2009-06-12, 07:37
#4
Re: Re: Scala and Android 1.5
Removing the scala/testing directory seems to be key. I posted the jar I used here: http://scala-android.googlecode.com/files/android-library.jar. I am also going to add a few more utilities there as well. Thanks all for the help.
-- Michael
On Thu, Jun 11, 2009 at 9:41 AM, Michael Galpin <mike.sr@gmail.com> wrote:
-- Michael
On Thu, Jun 11, 2009 at 9:41 AM, Michael Galpin <mike.sr@gmail.com> wrote:
Thanks Jesper. Did you recompile scala-library.jar using the android-library to change ScalaObject and ScalaBeanInfo as well?
-- Michael
On Thu, Jun 11, 2009 at 12:06 AM, Jesper Nordenberg <megagurka@yahoo.com> wrote:
michaelg wrote:
So I tried to
use the Eclipse style build as in the note on the Scala site. That proved
non-trivial too. Some of the issues I encountered can be seen here:
http://groups.google.com/group/android-developers/browse_thread/thread/d81404181a393a14.
So I'm hoping somebody on here can help me get this working.
To get the scala-library.jar file working I simply unpacked it, removed the scala/testing directory, repacked it and added it as an external Jar file in the Eclipse Android project. It works, but the build times are quite long as the APK file must be rebuilt for each code change.
/Jesper Nordenberg
michaelg wrote:
> So I tried to
> use the Eclipse style build as in the note on the Scala site. That proved
> non-trivial too. Some of the issues I encountered can be seen here:
> http://groups.google.com/group/android-developers/browse_thread/thread/d....
> So I'm hoping somebody on here can help me get this working.
To get the scala-library.jar file working I simply unpacked it, removed
the scala/testing directory, repacked it and added it as an external Jar
file in the Eclipse Android project. It works, but the build times are
quite long as the APK file must be rebuilt for each code change.
/Jesper Nordenberg