Sunday, 19 September 2010

Converting Meditation Helper to Scala: I Hate Ant. And Eclipse.

I hate Ant. I really do. So much that I decided to revisit my strategy for this project. At first I tried to configure Maven, but that proved really difficult. I like Maven a lot, but the combination of the Android plugin, the Scala plugin, and the Proguard plugin seems really difficult to configure at the minute.

And so I have revisited sbt. I now have a working build using sbt. The next problem is to integrate that nicely with an IDE. I have tried to make this work well with Eclipse but, well I may as well say it - I hate Eclipse. I really do.

So where am I - sbt works well, and is probably the simplest solution for building an Android project in Scala. The Eclipse Scala plugin is a bit flaky. So - I've read good things about Intellij. The community edition will do Scala via a plugin. It won't do Android, but that's fine - I can handle all the Android stuff either from the command line or using sbt. All I need is a good Scala editor.

I will use to create the project files for Intellij. Fingers crossed...

Well that went very smoothly. After a weekend of wrestling with Eclipse, could I have found a winner in Intellij??


It has taken me all weekend. I have torn out most of my hair. But I now have a working development environment to re-write my app in Scala. I am using:
  • Scala 2.8.0
  • Sbt 0.74
  • JUnit 4 
  • Intellij 9.0.3
All builds etc are run through the sbt console. I only use Intellij for it's Scala editing capabilities, with Android added as a standard jar library. Any Android stuff I can do directly using the tools from the command line.

Hallelujah. My work here is done. Now I can really write some code.


No comments:

Post a Comment