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 -->
<proguard>
-libraryjars ${android.jar}: ${external-libs-folder}
-injars ${out-classes-location}
-outjars ${obfuscate-location}/classes.min.jar
-keep public class * extends android.app.Activity
-optimizations !code/simplification/cast
-allowaccessmodification
</proguard>
</target>
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.