build: android signed release
This commit is contained in:
parent
68c9c9df04
commit
d39e2ec21e
2 changed files with 21 additions and 13 deletions
|
@ -2,10 +2,6 @@ plugins {
|
|||
id 'com.android.application'
|
||||
}
|
||||
|
||||
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
def keystoreProperties = new Properties()
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
|
||||
android {
|
||||
compileSdk 33
|
||||
ndkVersion '26.0.10792818'
|
||||
|
@ -18,20 +14,32 @@ android {
|
|||
versionName "0.1.3"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile file(keystoreProperties['storeFile'])
|
||||
storePassword keystoreProperties['storePassword']
|
||||
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
def keystoreProperties = new Properties()
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile file(keystoreProperties['storeFile'])
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
signedRelease {
|
||||
initWith release
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
|
|
|
@ -59,12 +59,12 @@ function build_apk() {
|
|||
|
||||
cd android
|
||||
./gradlew clean
|
||||
./gradlew assembleRelease
|
||||
./gradlew assembleSignedRelease
|
||||
|
||||
# Setup release file name
|
||||
if [ -n $1 ]; then
|
||||
rm -rf grim-${version}-$1.apk
|
||||
mv app/build/outputs/apk/release/app-release.apk grim-${version}-$1.apk
|
||||
mv app/build/outputs/apk/signedRelease/app-signedRelease.apk grim-${version}-$1.apk
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
|
Loading…
Reference in a new issue