wayne piekarski Signing Android APKs with gradle from the command line

 
Share Blog article posted August 2014

Here is something new that I learned about how to build and sign an Android Studio gradle project from the command line without editing any files. This makes it very nice for storing your project in version control while keeping your keys and passwords separate from your build.gradle file:

./gradlew assembleRelease \
  -Pandroid.injected.signing.store.file=$KEYFILE \
  -Pandroid.injected.signing.store.password=$STORE_PASSWORD \
  -Pandroid.injected.signing.key.alias=$KEY_ALIAS \
  -Pandroid.injected.signing.key.password=$KEY_PASSWORD

Every suggestion I've seen so far relied on editing build.gradle or doing things manually yourself, but this new solution allows everything to be fully automated. This is how I like to do things.


Share Blog article posted August 2014


Developer Advocate for Iot and Assistant


IoT water meter monitoring


Tiny and cheap offline Wikipedia project


Dylan with custom GoPro backpack


Outdoor augmented reality research
Tinmith 1998-2006


Outdoor augmented reality gaming
ARQuake 1999-2006


Scanned physical objects outdoors
Hand of God 3D 2006


Developer Advocate for Iot and Assistant


IoT water meter monitoring


Tiny and cheap offline Wikipedia project


Dylan with custom GoPro backpack


Outdoor augmented reality research
Tinmith 1998-2006


Outdoor augmented reality gaming
ARQuake 1999-2006


Scanned physical objects outdoors
Hand of God 3D 2006


Contact Wayne Piekarski via email wayne AT tinmith.net for more information

Last Updated 2017