add signing to buildGradleApp

This commit is contained in:
Ali Abrar 2017-05-16 17:22:55 -04:00 committed by Matthew Bauer
parent 62b59e5353
commit 1cc64da8d4

View File

@ -78,6 +78,25 @@ stdenv.mkDerivation ({
}; };
buildPhase = '' buildPhase = ''
${stdenv.lib.optionalString release ''
# Provide key signing attributes
( echo "RELEASE_STORE_FILE=${keyStore}"
echo "RELEASE_KEY_ALIAS=${keyAlias}"
echo "RELEASE_STORE_PASSWORD=${keyStorePassword}"
echo "RELEASE_KEY_PASSWORD=${keyAliasPassword}"
) >> local.properties
cat >>build.gradle <<EOF
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
EOF
''}
buildDir=`pwd` buildDir=`pwd`
cp -r $ANDROID_HOME $buildDir/local_sdk cp -r $ANDROID_HOME $buildDir/local_sdk
chmod -R 755 local_sdk chmod -R 755 local_sdk