This commit is contained in:
Vadim 2023-02-15 23:02:46 +03:00
parent 4988f31481
commit cffe71c029
2 changed files with 18 additions and 3 deletions

View file

@ -33,6 +33,18 @@ jobs:
- name: Analyze project source
run: flutter analyze
- name: Restore Android keystore .jsk and .properties files
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}
run: |
KEYSTORE_PATH=$RUNNER_TEMP/keystore.jks
echo -n "$KEYSTORE" | base64 --decode --output $KEYSTORE_PATH
cp $KEYSTORE_PATH ./android/app
KEYSTORE_PROPERTIES_PATH=$RUNNER_TEMP/key.properties
echo -n "$KEYSTORE_PROPERTIES" | base64 --decode --output $KEYSTORE_PROPERTIES_PATH
cp $KEYSTORE_PROPERTIES_PATH ./android
- name: Build Apk
run: flutter build apk --flavor dev --dart-define cameraPreviewAspectRatio=2/3 -t lib/main_dev.dart

View file

@ -21,6 +21,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))
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
@ -50,15 +56,12 @@ android {
}
signingConfigs {
debug {}
/*
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
*/
}
flavorDimensions "app"