0

I am looking to go back into Android Dev, and one idea I want to try involves limiting the amount of code in the app per selected options. For example, there is basic functionality that every combination has and then other components that can be built in per customer requirements.

Does any one know of any tech that can help with me attempting to do this or am I just going to have to get creative with Custom ANT tasks?

user1281598
  • 217
  • 4
  • 17
  • 1
    From what I know of Android development and build tasks - or rather, what I was *told* by Gradleware - [Gradle](http://www.gradle.org/) is the preferred standard of build scripts now for Android projects. Although to be frank, you can do it any way you like - Ant, Maven, Ivy, Makefiles, etc. – Makoto Sep 15 '13 at 00:59
  • Thanks for your answer. I'll look at it. You mind making it an answer? – user1281598 Sep 16 '13 at 00:28

1 Answers1

0

I developped a similar architecture from my android-app : a standard core app and many little variation (depending on target hardware, customer needs, ...)

I started by using ant and the standard build.xml, with customizations based on a properties passed to the ant build script. It was very painful to integrate properly with eclipse (since in some variation of the app there where different dependencies and submodules).

It was too complex to maintain and I started using maven, defining one profile for each variation of the app. Of course using an IDE with a good maven integration is required to switch easily between profiles. (I'm using IntelliJ)

Recently I tried to rewrite my build scripts with gradle... and it has been so easy with the productFlavors (each variation of the app became a flavor, define with no more than 2 or 3 lines in build.gradle). I'm still using IntelliJ and maven profiles to switch easily between flavors in my IDE... so there is some kind of duplication of data between both build files (but I can live with that, because one day Android Studio will be released and gradle will be enough)

So, my conclusion : use gradle as build tool.

ben75
  • 29,217
  • 10
  • 88
  • 134
  • So about these build flavors. I can I create them dynamically in the gradle build notation? I would want to see how each and every variation tests out. I would probably think about modding the test cases dynamically as well. – user1281598 Sep 16 '13 at 16:03
  • You can create flavor dynamically. Here is the official android-gradle-guide : http://tools.android.com/tech-docs/new-build-system/user-guide. Gradle language is nothing else than Groovy with "build oriented" DSL so it's very powerful and flexible. – ben75 Sep 16 '13 at 18:25