Thanks Xavier! This works great
applicationVariants.all { variant ->
if (variant.buildType.name.equals('buildTypeIWantToChangeVersionCodeOf')) {
variant.mergedFlavor.versionCode = getCustomVersionCode()
}
}
On Friday, July 17, 2015 at 5:00:56 PM UTC-7, Xavier Ducrohet wrote:
>
> You should just do something similar to this tip but based on the build
> type:
> http://tools.android.com/tech-docs/new-build-system/tips#TOC-Computing-Version-code-in-multi-flavor-setup
> .
>
> On Fri, Jul 17, 2015 at 3:54 PM, Tyler Pfaff <[email protected]
> <javascript:>> wrote:
>
>> +1 I would like this feature because of hockey app's requirement for a
>> larger build number to auto notify testers.
>>
>> On Thursday, May 23, 2013 at 11:38:31 AM UTC-7, Benjamin Cooley wrote:
>>>
>>> I have a requirement that our debug packages and our release packages
>>> contain different version codes (well, different suffixes at least).
>>> Reading over the documentation, there seems no way to do this, the closest
>>> I can come is to make a different flavor for debug/release and just ignore
>>> BuildTypes?
>>>
>>> Is there a way to make versionCode specific to build type? If not, is it
>>> possible to disable build type and only use flavors?
>>>
>>> - Ben
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "adt-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
> http://developer.android.com | http://tools.android.com
>
> Please do not send me questions directly. Thanks!
>
--
You received this message because you are subscribed to the Google Groups
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.