diff --git a/flutter_hbb/android/app/build.gradle b/flutter_hbb/android/app/build.gradle index 2f2db6973..c83feda57 100644 --- a/flutter_hbb/android/app/build.gradle +++ b/flutter_hbb/android/app/build.gradle @@ -1,3 +1,9 @@ +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file('key.properties') +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -45,11 +51,20 @@ android { versionName flutterVersionName } + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } + } + buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig signingConfigs.release } } } diff --git a/flutter_hbb/android/key.jks b/flutter_hbb/android/key.jks new file mode 100644 index 000000000..8e1763f46 Binary files /dev/null and b/flutter_hbb/android/key.jks differ