2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +00:00

Setup key signing

This commit is contained in:
Oliver Walters 2021-02-14 23:13:08 +11:00
parent 822d1be2e2
commit b6ccb57065
4 changed files with 38 additions and 4 deletions

3
.gitignore vendored
View File

@ -12,6 +12,9 @@
# Sentry API key
lib/dsn.dart
# App signing key
android/key.properties
# IntelliJ related
*.iml
*.ipr

17
RELEASE.md Normal file
View File

@ -0,0 +1,17 @@
# Release Process
## Android Play Store
[Reference](https://flutter.dev/docs/deployment/android#signing-the-app)
### Key File
Add a file `key.properties` under the android/ directory
### Increment Build Number
Make sure that the build number is incremented every time (or it will be rejected by Play Store).
### Build Appbundle
`flutter build appbundle`

View File

@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'kotlin-android'
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 29
@ -37,7 +43,6 @@ android {
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "inventree.inventree_app"
minSdkVersion 25
targetSdkVersion 29
@ -47,11 +52,20 @@ 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
}
}
}

View File

@ -7,8 +7,8 @@ export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=C:\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "FLUTTER_BUILD_NAME=0.1.0"
export "FLUTTER_BUILD_NUMBER=0.1.0"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"