From b2c674d65acb1ecd991d1f1afe8ca0e2185caa47 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Thu, 22 Apr 2021 18:46:16 -0400 Subject: [PATCH] Minor tweaks for a clean build - Updated README with some maybe-helpful instructions for downgrading flutter to a version that will build the project - Added a step to create a missing directory to the Gradle build (otherwise the build fails) - Set `shrinkResources false` - otherwise you get an error that you can't shrink resources unless you also enable minifying --- README.md | 8 ++++++++ android/app/build.gradle | 1 + gen-artifacts.sh | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f6f8987..1ca12fc 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ - [`android-studio`](https://developer.android.com/studio) - [Enable NDK](https://developer.android.com/studio/projects/install-ndk) Check local.properties for current NDK version +Downgrade flutter to a 1.x release (the following worked on an AUR install of `flutter`) + +``` +cd $(dirname $(readlink $(which flutter))) +git checkout 1.22.6 +flutter doctor +``` + Copy env.sh.example to env.sh and update your PATH variable to expose both flutter and go bin directories ```export PATH="$PATH:/path/to/go/bin:/path/to/flutter/bin``` diff --git a/android/app/build.gradle b/android/app/build.gradle index cc25d96..1ab6f68 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -66,6 +66,7 @@ android { // We are disabling minification and proguard because it wrecks the crypto for storing keys // Ideally we would turn these on. We had issues with gson as well but resolved those with proguardFiles + shrinkResources false minifyEnabled false useProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' diff --git a/gen-artifacts.sh b/gen-artifacts.sh index 601ed7b..cab8453 100755 --- a/gen-artifacts.sh +++ b/gen-artifacts.sh @@ -16,6 +16,7 @@ if [ "$1" = "ios" ]; then elif [ "$1" = "android" ]; then # Build nebula for android make mobileNebula.aar + mkdir -p ../android/app/src/main/libs rm -rf ../android/app/src/main/libs/mobileNebula.aar cp mobileNebula.aar ../android/app/src/main/libs/mobileNebula.aar @@ -48,4 +49,4 @@ cd .. # Try and avoid issues with building by moving into place after we are complete #TODO: this might be a parallel build of deps issue in kotlin, might need to solve there -mv lib/.gen.versions.dart lib/gen.versions.dart \ No newline at end of file +mv lib/.gen.versions.dart lib/gen.versions.dart