Search code examples
androidandroid-studiogradlerelease-management

Gradle Build Variants and Flavors for and Release Management


We have started building a new (the first from our team) android application. I want understand the release mechanism for the Android development. Say we have release some version 1.1.0.1 and now we have decided to go to a new major version 2.0.0.0 with lots of new features and completely reworked UI.

It is assumed that this whole process will be taking a lot of time, sufficient enough for the previous major to be able to attract a few enhancements or fixes.

Now in my previous experience with .net and all we used source control branch for the new build and keep pushing the required modification to the old branch and created a tag out of it every time a new release is created and once the another major version is released the branches are merged together and a new tag is released from there.

This all merging pulling/pushing of code requires a great effort and a keen eye to keep up the Source Control neat and clean.

With the start of Android and Gradle build variant and flavor option, is there anything possible to keep the common code in a single place for the enhancements so that anything which we require to be available in both the builds are kept there. And only the features and code required in the new major build goes in there.

Please let me know if I am making any sense here or you are seeking more clarity on the question.

I will be glad to find out the ways to effectively manage the code here.


Solution

  • Anant, imho GitFlow Workflow is the best solution to adopt (and is not old school!!!)

    Read the End-user discovers a bug chapter of this link;

    With this workflow you can have your hot-fixes in master and develop branch just by closing the hot-fix. Try it!