-
-
Save jush/5745425 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// additional required configuration to hook into the build script | |
android { | |
signingConfigs { | |
release { | |
// specify signing properties on the command line | |
if (project.hasProperty('keyStore')) { | |
println 'Generating a signed package.' | |
storeFile file(keyStore) | |
storePassword storePass | |
keyAlias alias | |
keyPassword keyPass | |
} | |
} | |
} | |
buildTypes { | |
release { | |
if (project.hasProperty('keyStore')) { | |
signingConfig signingConfigs.release | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -ne 2 ]]; then | |
echo "Usage: $0 keystore keyalias" | |
exit 1 | |
fi | |
if [[ ! -f $1 ]]; then | |
echo "$1 doesn't exist or isn't a keystore" | |
exit 1 | |
fi | |
read -s -p "Keystore Password: " STORE_PASS | |
echo | |
read -s -p "Key Password: " KEY_PASS | |
echo | |
export ORG_GRADLE_PROJECT_keyStore="$1" | |
export ORG_GRADLE_PROJECT_storePass="$STORE_PASS" | |
export ORG_GRADLE_PROJECT_alias="$2" | |
export ORG_GRADLE_PROJECT_keyPass="$KEY_PASS" | |
./gradlew signingReport | |
read -p "Is this correct? [y/n] " -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
./gradlew build | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment