Is ANT support Broken in Android SDK?

Posted: July 28, 2009 in Android, Java, Mobile
Tags: , , , ,

As you know if you read my posts on Android SDK customization that I customize the Android SDK to supply better ANT scripts upon executing the create project command. Here is what I mean by broke, mobile development is different in that we have more one-person-shops than say in enterprise development. Thus, having default build scripts to  handle most user cases in android development becomes more of a priority for getting developer s to the platform as these developers will  not become Apache ANT experts just to use the platform.

And the Android SDK set-up is such that one cannot easily make changes ot the android_rules.xml file to fix the ANT support becasue that would break other things. Sure, I could  suggest that we intentionally break the build.template in order to get better build scripts in the Android SDk but that fix/enhancement will never get approval not because it gives more stuff to application developers but it is  how android_rules.xml and build.template in the SDK were originally setup as far with other components having dependencies on those files.

The most obvious potential supporter of this movement towards better ANT support for Android Developers  would be Motorola as the current release of MotoDveStudio for Android  shows. I am not sure how to crack that ‘wall’ at this time as I run into too many ‘oh Motorola is so big we do not know where to ask your question’ response from any Motorola employee I ask(You should have seen how long it took to get Moto HQ staff to change from going my old blog to this one, shakes head..sheesh!)

So what does an example user case look like indicating broken ANT support? The continued  every new Android Developer getting Proguard settings in their ANT task wrong, perhaps? The question now appears on the developers lists more than once a week. That is just one example, as the questiosn about ANT have gone up from only one per month when Google started the android Dev lists to several per week.

According to Fadden(Proguard), here is how obfuscation task should look:

<target name="-obfuscate" depends="compile.incremental">
			<!-- In versions prior to 4.4 Peephole optimization was turned off
			     however in 4.4beta is now on and thus we
			     have turn off with the command of
			     -optimizations !code/simplification/cast
			     per Fadden also use
			     -allowaccessmodification -->
			  -libraryjars ${android.jar}: ${external-libs-folder}
			  -injars      ${out-classes-location}
			  -outjars     ${obfuscate-location}/classes.min.jar
			  -keep public class * extends
			  -optimizations !code/simplification/cast


Notice that there are now two new settings and that is updated per Fadden’s notes from this week. That is just a sample of the areas of ANT support where the Android developers do not want to become ANT experts or build engineer experts but they need to know or have a basic default set of build scripts that is specific to Android development.

If we do not tackle this now, when 9 million Android devices hit the market it will ‘bite’ the whole development community in the ass.

Reblog this post [with Zemanta]
  1. Xavier Ducrohet says:

    Where did you get this idea that improvements/patches would not get approval?
    Start a thread on android-platform with what you want to see (and what you’re ready to contribute) and we’ll see how we can move forward.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s