Reputation: 6123
According to https://stackoverflow.com/a/23072096/2835239 and http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Sourcesets-and-Dependencies
we have a posibility to use different source set for each flavor. This is great. But i have some code that the same for each flavor, but different for build types i have source sets
-- main --- default source set
-- flavor1
-- flavor2
I can create
-- main
--flavor1
--flavor1Release
--flavor1Debug
--flavor2
--flavor2Release
--flavor2Debug
but i can't create
-- main
-- mainRelease
-- mainDebug
Upvotes: 0
Views: 2914
Reputation: 1006549
mainRelease
is called release
, and mainDebug
is called debug
. This is covered in the first answer that you linked to.
IOW, to have build-type-specific variations of the main
sourceset, you use a sourceset that is the name of the build type (release
, debug
, and any custom ones that you create).
Upvotes: 4