Build without signing

2,734 views
Skip to first unread message

David Lichtenberg

unread,
May 29, 2014, 2:39:01 PM5/29/14
to adt...@googlegroups.com
Is there a way to build an apk using the android gradle plugin without signing it?

Xavier Ducrohet

unread,
May 29, 2014, 5:07:55 PM5/29/14
to adt...@googlegroups.com
Just change the signing config associated with your build type to be null.

android {
  buildTypes {
    debug {
      signingConfig null
    }
  }
}



On Thu, May 29, 2014 at 11:39 AM, David Lichtenberg <da...@perka.com> wrote:
Is there a way to build an apk using the android gradle plugin without signing it?

--
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 adt-dev+u...@googlegroups.com.
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!

Avram Lyon

unread,
May 29, 2014, 11:29:13 PM5/29/14
to adt...@googlegroups.com
On Thu, May 29, 2014 at 5:07 PM, Xavier Ducrohet <x...@android.com> wrote:
Just change the signing config associated with your build type to be null.


Is there a way to do this on a per-flavor basis? Seems to only work on build types.

Xavier Ducrohet

unread,
May 29, 2014, 11:38:04 PM5/29/14
to adt...@googlegroups.com
Not in a nice way.

Since we are talking about the debug signing here, you could:

- disable signing on the debug build type.
- for the flavors you want to sign, configure them to sign with the debug signing.

But this means they'll always be signed with debug key unless you create another signing config for release and assign it to the release build type. Then this will override the signing config on the flavor.

If the flavor have a signing config but the build types don't then the flavor one wins.

What's your use case anyway to sign some flavors with the debug key but not others?



--
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 adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Avram Lyon

unread,
May 30, 2014, 9:31:51 AM5/30/14
to adt...@googlegroups.com
On Thu, May 29, 2014 at 11:37 PM, Xavier Ducrohet <x...@android.com> wrote:
What's your use case anyway to sign some flavors with the debug key but not others?

We are using Amazon's two-step APK signing procedure on one of our titles, which means we need to get unsigned APKs for only the Amazon flavor, for release builds. We upload the unsigned APK to their console, they inject their modifications, and we download the modified version and re-sign it. This is an option that they no longer encourage, but we're stuck with the two-step procedure for this one title.

Xavier Ducrohet

unread,
May 30, 2014, 1:40:59 PM5/30/14
to adt...@googlegroups.com
Well if you are talking strictly about release signing then it's different!

Don't change the signing config of the debug buildType.

Don't setup any signing config on the release build type. Instead set it up on the flavors you want to sign directly from gradle (I'm guessing the flavor associated with the "Play Store" variant?).

Then your release build for your amazon variant won't be signed but the release build of your play store one will be.


--
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 adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages