The Artima Developer Community
Sponsored Link

Java Buzz Forum
Android App Builds Using Gant

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Fred Grott

Posts: 105
Nickname: sharemefg
Registered: Nov, 2005

Fred Grott is an android developer producing prototype applications for Chicago start-ups
Android App Builds Using Gant Posted: Aug 13, 2012 9:20 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Fred Grott.
Original Post: Android App Builds Using Gant
Feed Title: GrottWorkShop
Feed URL: http://shareme.github.io/atom.xml
Feed Description: Android development with a passion for Android, Java, and Agile.
Latest Java Buzz Posts
Latest Java Buzz Posts by Fred Grott
Latest Posts From GrottWorkShop

Advertisement

So everyone knows the Android App build system is a mess. Here are the problems with choosing to replace Ant:

Groovy Gradle

Groovy is nice it has a lot stuff we could use for example hooks into dependency management. Groovy is java scripting so the syntax is the same. The problem is that Google adopted some convetions with the project layout and the Gradle Android plugin did not adpot them. So every time Google updates the ant tasks of the SDK we have two areas that the Gradle Android plugin has to update, one the conversion of the ant macro changes to groovy within the plugin and adjust if Google inserted any new project conventions.

Apache Buildr

Its not bad, but its still in raw condition and you would have to translate ant macros to Ruby script and Ruby is different than java.

EasyAnt

EasyANT is problematic because it forces to do ivy modules in xml as the build script. Not that the concept is bad itself but there is a lack of IDE tooling to support as far as editing IVY module files such as code completion, etc.

Groovy Gant

Pluses, it lacks the build lifecycle that Gradle has but has the ivy hooks and is straight groovy scripting which is very similar to java. Minuses, you still have to translate the ant macros to groovy scripting. However, its under you control to maintain which is better than the Gradle Android plugin at least for my use case.

Problems left to Solve

With the introduction to ADT 20 Google included a new feature of the Eclipse Android plugin having the lib sfolder synch with the project claspath. Perfect for beginning Android developers but it really messes it up for andvance developers using dependency management. Why?

Normally, you write something like a Maven pom file or and Apache IVY module file to handle project depedencies and additionally you set gitginore to ignore the library folder. That way the library dependencies are managed under not SCM control but either Maven or IVY control. The solution probably is to have IVY load the dependencies under their confiuration designation in an ext-libs folder and somehow compose a gant target that rewrites the Eclipse classpath metadata file to add the libs in the ext-libs folder to the project classpath.

The other problem is project layout set up an verification. When developing advance android projects you develop your own set project layout that contains more items than what the new project command of the ADT plugin or sdk tools provides. Thus we need a simple way to add that stuff to the project layout and verify it. Probalby the answer would be to convert all that stuff to IVY repo layout terms, ie org and module or if you will a two deep folder structure.

I would still have to re-create the folder layout in the project but I could retrieve all the items from IVY which reduces the errors due to forgetting to copy something or getting its placement in the project layout wrong.

Than I have to extend the IVY module as in android development we not only have release, but we also have debug but what about different appstores? Or would it be better to store the published artifact under configuration names for debug, googleplay, amazonappstore, htcbaiduappstore, etc?

Once finished it still does not address other issues of the Google Android App build system. For example, to test on mulitple OS versions you have to manually launch some AVDs and than take the project which is compiled with the AndroidManifest set to the highest OS and adb push it to each AVD. Its obvious an area that demands it be automated via the build script.

Read: Android App Builds Using Gant

Topic: Fixing Bugs - if you can't reproduce them, you can't fix them Previous Topic   Next Topic Topic: Android WebView CSS Support

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use