Dont set a signingconfig on the release build-type, it'll override the
signing config set in the flavor (this is how the debug signing config
works).
If you really have a lot of B* flavors, I would try to do something like
this after you create the flavors/signingconfigs:
for (int i = 0 ; i < n ; i++) {
android.produtFlavors.getByName("B${i}").signingConfig =
android.signingConfigs.getByName("releaseB${i}")
}
On Wed, Nov 26, 2014 at 11:45 AM, Aditya Gore <[email protected]> wrote:
> I have an app that has several flavors: A, B, B1..Bn
>
> The release buildType for Flavor A needs to be signed using one
> signingConfig and the release buildType for all "B" flavors need a second
> signingConfig. However I want all debug buildTypes to be unsigned or signed
> with the default debug key. The closest I got was to define a default
> signingConfig for the release buildType and then override that in the "A"
> productFlavor. But that causes both release and debug buildTypes for A to
> get the "A" signingConfig, which I don't want. I tried
> applicationVariants.find {it.name == "ARelease"}.signingConfig =
> signingConfigs.ARelease, but turns out that's a read-only property in the
> applicationVariants.* closure.
>
> Any pointers? Thanks much.
>
> My build.gradle (summarized) :
>
> android {
> ...
> signingConfigs {
> releaseA {
> ...
> }
> releaseB {
> ...
> }
> }
> buildTypes {
> release {
> signingConfigs signingConfigs.releaseB
> }
> }
> productFlavors {
> A {
> signingConfig signingConfigs.releaseA
> }
> B1 {
> }
> ...
> Bn {
> }
> }
> }
>
> --
> 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.
>
--
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.