I have a project where I need to make new builds once a month or so with incremental changes. The previous minimum supported API level was 19 and some devices were at that level so it was necessary to support it.

A new dependency that is being implemented (by the client) requires a new minimum API of 21 and there will be a large quantity of code inserted to support it.

The core of the issue here is that moving forward I still need to support a build a month (ish), I need to support those older API level 19 devices, and I need to support the new code for API level 21 or higher devices.

I have been thinking of simply changing the minimum API level, removing the new dependency, commenting out the new code, and making a build for API 19 devices and then undoing that process to make the new build for API 21+ devices, but that seems awfully inefficient.

My question therefore is, what is the most efficient way to create multiple builds that have to support different API levels without going through and commenting out code and removing dependencies?

0 Answers