fix: keystoreProperties

This commit is contained in:
Hiddify
2023-08-22 08:56:48 +00:00
parent f22812f11b
commit bfc026900b

View File

@@ -21,6 +21,11 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0' flutterVersionName = '1.0'
} }
def keystoreProperties = new Properties()
def keystorePropertiesFile=rootProject.file('release.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
@@ -70,13 +75,11 @@ android {
} }
} }
signingConfigs { signingConfigs {
release { release {
def properties = new Properties() keyAlias keystoreProperties['key.alias']
properties.load(new FileInputStream(rootProject.file('release.properties'))) keyPassword keystoreProperties['key.password']
keyAlias properties['key.alias'] storeFile keystoreProperties['keystore.path']? file(keystoreProperties['keystore.path']): null
keyPassword properties['key.password'] storePassword keystoreProperties['keystore.password']
storeFile file(properties['keystore.path'])
storePassword properties['keystore.password']
} }
} }