v1.5.0-hotfix5: Use key.properties per Flutter docs

This commit is contained in:
zarzet
2026-01-02 04:27:02 +07:00
parent 6563f0f2b3
commit 37b8682faa
4 changed files with 13 additions and 18 deletions

View File

@@ -88,13 +88,12 @@ jobs:
- name: Setup Keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/ci-keystore.jks
echo "storeFile=ci-keystore.jks" > android/keystore.properties
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/keystore.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/keystore.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/keystore.properties
ls -la android/app/ci-keystore.jks
cat android/keystore.properties | head -1
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/upload-keystore.jks
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" > android/key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
echo "storeFile=app/upload-keystore.jks" >> android/key.properties
cat android/key.properties
- name: Build APK (Release)
run: flutter build apk --release --split-per-abi

View File

@@ -5,8 +5,8 @@ plugins {
id("dev.flutter.flutter-gradle-plugin")
}
// Load keystore properties from file if exists
val keystorePropertiesFile = rootProject.file("keystore.properties")
// Load keystore properties from key.properties file
val keystorePropertiesFile = rootProject.file("key.properties")
val keystoreProperties = java.util.Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(java.io.FileInputStream(keystorePropertiesFile))
@@ -32,10 +32,10 @@ android {
signingConfigs {
if (keystorePropertiesFile.exists()) {
create("release") {
storeFile = file("app/${keystoreProperties["storeFile"]}")
storePassword = keystoreProperties["storePassword"] as String
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}
}
@@ -48,8 +48,6 @@ android {
versionName = flutter.versionName
multiDexEnabled = true
// Only include arm64-v8a for smaller APK (most modern devices)
// Remove this line if you need to support older 32-bit devices
ndk {
abiFilters += listOf("arm64-v8a", "armeabi-v7a")
}
@@ -57,13 +55,11 @@ android {
buildTypes {
release {
// Use release signing config if available, otherwise fall back to debug
signingConfig = if (keystorePropertiesFile.exists()) {
signingConfigs.getByName("release")
} else {
signingConfigs.getByName("debug")
}
// Enable code shrinking and resource shrinking
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(

View File

@@ -1,8 +1,8 @@
/// App version and info constants
/// Update version here only - all other files will reference this
class AppInfo {
static const String version = '1.5.0-hotfix4';
static const String buildNumber = '18';
static const String version = '1.5.0-hotfix5';
static const String buildNumber = '19';
static const String fullVersion = '$version+$buildNumber';
static const String appName = 'SpotiFLAC';

View File

@@ -1,7 +1,7 @@
name: spotiflac_android
description: Download Spotify tracks in FLAC from Tidal, Qobuz & Amazon Music
publish_to: 'none'
version: 1.5.0+18
version: 1.5.0+19
environment:
sdk: ^3.10.0