From 37b8682faa0cef9a7cfa66059ae6ca9082d057e2 Mon Sep 17 00:00:00 2001 From: zarzet Date: Fri, 2 Jan 2026 04:27:02 +0700 Subject: [PATCH] v1.5.0-hotfix5: Use key.properties per Flutter docs --- .github/workflows/release.yml | 13 ++++++------- android/app/build.gradle.kts | 12 ++++-------- lib/constants/app_info.dart | 4 ++-- pubspec.yaml | 2 +- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d27d148..ca8d137 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 40c8654..a2aeff8 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -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( diff --git a/lib/constants/app_info.dart b/lib/constants/app_info.dart index 7be161e..4b0724b 100644 --- a/lib/constants/app_info.dart +++ b/lib/constants/app_info.dart @@ -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'; diff --git a/pubspec.yaml b/pubspec.yaml index 3f685ea..7a027e0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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