Ant scripting in the Android SDK

by Stephane Micheloud, June 2010

[Home]
[Back]

Building Scala applications targeted to the Android platform continously enrichs our developer's experience with the Android SDK. In this article we want to share a few changes we applied to‎ the Ant build scripts in order to improve the default behavior of the build process of Android projects.

The following changes are independent from the Scala environment settings we described in our article "Targeting Scala to the Android platform".

Changes in main_rules.xml

The Ant rules file main_rules.xml is located in the ${sdk.dir}/tools/ant/ directory; it is imported by the custom Ant task com.android.ant.SetupTask (see line 47 of file build.xml in your project directory).

Note: Android platforms prior to version 2.3 rely on the Ant rule file ant_rules_r2.xml which exists for each installed API level and is located in the ${sdk.dir}/platforms/android-<X>/ant/ directory.

About the Author

Stephane's Picture
Stéphane Micheloud is a senior software engineer. He worked on Scala for over six years as a doctoral assistant at EPFL. Previously he was a professor at HES-SO // Valais in Sierre, Switzerland. He has a Ph.D. in computer science from EPFL, where he worked on distributed programming and advanced compiler techniques. He regularly contributes to the Scala project, most notably targeting the Android platform.
[Top]

Other Articles