Skip to content

Commit

Permalink
Setup for releasing first version of app
Browse files Browse the repository at this point in the history
  • Loading branch information
0singh-ajit0 committed Dec 26, 2023
1 parent c1fd869 commit 5f42121
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
namespace "com.example.mynotes"
compileSdkVersion flutter.compileSdkVersion
Expand Down Expand Up @@ -52,11 +58,17 @@ android {
multiDexEnabled true
}

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
}
}
}
Expand Down

0 comments on commit 5f42121

Please sign in to comment.