From 413059c9cb0b8139f6ebbf381683ae78abf8860b Mon Sep 17 00:00:00 2001 From: Marcin Wojnarowski Date: Fri, 7 Jan 2022 08:10:32 +0100 Subject: [PATCH] Fallback to debug signing config (#312) --- README.md | 10 +++++----- android/app/build.gradle | 9 ++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index bd7e892..c69276b 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ A mobile client for [Lemmy](https://github.com/LemmyNet/lemmy) - a federated red ### Android -1. Build: `flutter build apk` +1. Build: `flutter build apk --flavor prod --target lib/main_prod.dart --release` -The apk will be in `build/app/outputs/flutter-apk/app-release.apk` +The apk will be in `build/app/outputs/flutter-apk/app-prod-release.apk` ### Linux @@ -47,9 +47,9 @@ The apk will be in `build/app/outputs/flutter-apk/app-release.apk` ```sh flutter config --enable-linux-desktop ``` -3. Build: `flutter build linux` +3. Build: `flutter build linux --target lib/main_prod.dart --release` -The executable will be in `build/linux/release/bundle/lemmur` (be aware, however, that this executable is not standalone) +The executable will be in `build/linux/x64/release/bundle/lemmur` (be aware, however, that this executable is not standalone) ### Windows @@ -58,7 +58,7 @@ The executable will be in `build/linux/release/bundle/lemmur` (be aware, however ```sh flutter config --enable-windows-desktop ``` -3. Build: `flutter build windows` +3. Build: `flutter build windows --target lib/main_prod.dart --release` The executable will be in `build\windows\runner\Release\lemmur.exe` (be aware, however, that this executable is not standalone) diff --git a/android/app/build.gradle b/android/app/build.gradle index 8b8ad77..9847cf9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -54,8 +54,6 @@ android { } signingConfigs { - dev { } - if (System.getenv("ANDROID_STORE_PATH")) { prod { keyAlias System.getenv("ANDROID_KEY_ALIAS") @@ -64,7 +62,12 @@ android { storePassword System.getenv("ANDROID_STORE_PASSWORD") } } else { - prod { } + prod { + keyAlias signingConfigs.debug.keyAlias + keyPassword signingConfigs.debug.keyPassword + storeFile signingConfigs.debug.storeFile + storePassword signingConfigs.debug.storePassword + } } }