Commit e1844daa authored by Geoffrey Métais's avatar Geoffrey Métais

Add signed release build type

parent e60442d7
......@@ -31,6 +31,7 @@ while [ $# -gt 0 ]; do
echo " X86: x86, x86_64"
echo " MIPS: mips, mips64."
echo "Use --release to build in release mode"
echo "Use --signrelease to build in release mode and sign apk, see vlc-android/build.gradle"
echo "Use -s to set your keystore file and -p for the password"
echo "Use -c to get a ChromeOS build"
echo "Use -l to build only LibVLC"
......@@ -46,6 +47,10 @@ while [ $# -gt 0 ]; do
-r|release|--release)
RELEASE=1
;;
signrelease|--signrelease)
SIGNED_RELEASE=1
RELEASE=1
;;
-s|--signature)
KEYSTORE_FILE=$2
shift
......@@ -262,7 +267,9 @@ fi
##################
PLATFORM="Vanilla"
BUILDTYPE="Debug"
if [ "$RELEASE" = 1 ]; then
if [ "$SIGNED_RELEASE" = 1 ]; then
BUILDTYPE="signedRelease"
elif [ "$RELEASE" = 1 ]; then
BUILDTYPE="Release"
fi
if [ "$CHROME_OS" = 1 ]; then
......
......@@ -83,6 +83,27 @@ android {
}
}
signingConfigs {
release {
/*
To set this properties, create file gradle.properties with these 3 props.
e.g.
keyStoreFile=/home/<username>/.android/debug.keystore
storealias=androiddebugkey
storepwd=android
*/
storeFile file(keyStoreFile)
keyAlias storealias
if (System.getenv('PASSWORD_KEYSTORE') != null && !System.getenv('PASSWORD_KEYSTORE').isEmpty()){
storePassword = System.getenv('PASSWORD_KEYSTORE')
keyPassword = System.getenv('PASSWORD_KEYSTORE')
} else {
storePassword storepwd
keyPassword storepwd
}
}
}
buildTypes {
release {
signingConfig null
......@@ -90,6 +111,10 @@ android {
shrinkResources false
proguardFile 'proguard.cfg'
}
signedRelease {
initWith release
signingConfig = signingConfigs.release
}
debug {
applicationIdSuffix ".debug"
jniDebuggable true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment