feat: apk build
This commit is contained in:
		| @@ -12,6 +12,12 @@ if (localPropertiesFile.exists()) { | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | def keystoreProperties = new Properties() | ||||||
|  | def keystorePropertiesFile = rootProject.file('key.properties') | ||||||
|  | if (keystorePropertiesFile.exists()) { | ||||||
|  |     keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) | ||||||
|  | } | ||||||
|  |  | ||||||
| def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') | ||||||
| if (flutterVersionCode == null) { | if (flutterVersionCode == null) { | ||||||
|     flutterVersionCode = '1' |     flutterVersionCode = '1' | ||||||
| @@ -51,11 +57,21 @@ android { | |||||||
|         versionName flutterVersionName |         versionName flutterVersionName | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     signingConfigs { | ||||||
|  |         release { | ||||||
|  |             keyAlias keystoreProperties['keyAlias'] | ||||||
|  |             keyPassword keystoreProperties['keyPassword'] | ||||||
|  |             storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null | ||||||
|  |             storePassword keystoreProperties['storePassword'] | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     buildTypes { |     buildTypes { | ||||||
|         release { |         release { | ||||||
|             // TODO: Add your own signing config for the release build. |             // TODO: Add your own signing config for the release build. | ||||||
|             // Signing with the debug keys for now, so `flutter run --release` works. |             // Signing with the debug keys for now, so `flutter run --release` works. | ||||||
|             signingConfig signingConfigs.debug |             // signingConfig signingConfigs.debug | ||||||
|  |             signingConfig signingConfigs.release | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user