Friday, January 31, 2014

Eclipse Android Gradle Tricks

The number one trick to get this to work is to not create a
separate TestProject. Instead create a separate sub folder which you will mark as a third source named instrumentedTests.

Because you will direct gradle to build in the build sub folder you will not care what the Eclipse IDE puts into bin/classes anyway as you will be running tests from gradle anyway.

Tuesday, January 28, 2014

Auto Include APLs in Android Gradle

Part of the reason why you should switch to Gradle from Ant in your android app builds is to further automate stuff ot be more Agile. With ANT we had a way that the script that Google Engineers came up with included a macro to obtain the APLs paths from the file.

To do this in gradle takes two things modifying your settings.gradle file and adding some lines to the build.gradle to do the same thing.The answer is in this SO Question.

Wednesday, January 22, 2014


So I am completing a project to show the Eclipse android project layouts and the ant and gradle build scripts to transition from ant to gradle before the Eclipse ADT fully supports Gradle. What is left is putting the IVY repo stuff in and fill an IVY repo and than do some testing.

Once that is completed I can upload it to github and begin the gradle build script writing. The project layout adopts a project in a project layout with the parent project being the application and having two example sub projects with one being the test project and one being an APL.

Monday, January 20, 2014

Startup Incubator

Yes, me working on improving my tools and workflows in android mobile app development might mean that I might be preparing an application to a startup incubator for this

Its NWI Tech Foundry organized by Indiana government and Elevate Ventures and thus right close to where I live which makes it nice in that I do not have long commutes to Chicago.

If you are in Northwest Indiana and a developer you might want to consider preparing an application to this incubator.

Friday, January 17, 2014

Eclipse Android Gradle Fun

From what I understand about the android gradle layout, etc is that I will be able to write build.gradle files using the old Eclipse project layouts(including a separate test project) and have ti work inside Eclipse. I should than get the side benefit of being able to use AAR styled libraries, etc.

Thus will put the ANT scripts and gradle scripts all in the same projects so will have a nicer comparison of the benefits gained through using Gradle.  The only thing is until Eclipse ADT does the new gradle style project layouts we still have to contend with IDEA differences concerning the test and tested project side by side.

I think the gentle fix would be for me to adopt an eclipse Android project layout where I have a general project as the parent project folder and than include both the app project and the test project in that general project as sub-projects. Of course I will have to remember to set git up at the parent general project level to for both the app and test projects.

Saturday, January 11, 2014


Probably the most bonehead move in the android sdk is the assignment of the version of the sdk, sdk-tools, and extras libs to the variable property called Pkg.Version. Why?

Because, in ANT variables are immutable so you spend about 150 lines of code and a day or two learning a new ant task library in order to handle it as far as getting the version of
sdk, sdk-tools,and the extra libs from all those files in order to have a more agile build system that has the proper informative build log headers,etc.

Having a different prefix for every file pertaining to the artifact would have prevent this miss-step.

Thursday, January 9, 2014

Eclipse ANT AutoBuilds

So until I get  a new 32gig Ram Laptop I am setting up a new set of ANT Android Application build scripts that will act as a crude beginning CI that runs from the IDE automatically. At least that will keep me going until Google introduces the new ADT plugin for Eclipse with gradle enabled.

One slight problem, In Juno the Eclipse team took out the ability to set an ant builder as auto in the builder wizards. The work around answer in howto modify the launcher file for that is at the answer to this SO post.