narimetisaigopi

FLutter Building release APK file

Jun 30th, 2020 (edited)
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. ******* command for generating jks file ****
  2. keytool -v -genkey -v -keystore release.keystore -alias sai -keyalg RSA -validity 100000
  3. ***********************
  4.  
  5. ** android/app/build.gradle **
  6.  
  7. def keystoreProperties = new Properties()
  8. def keystorePropertiesFile = rootProject.file('key.properties')
  9. if (keystorePropertiesFile.exists()) {
  10. keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
  11. }
  12.  
  13. android{
  14. signingConfigs {
  15. release {
  16. keyAlias keystoreProperties['keyAlias']
  17. keyPassword keystoreProperties['keyPassword']
  18. storeFile file(keystoreProperties['storeFile'])
  19. storePassword keystoreProperties['storePassword']
  20. }
  21. }
  22. buildTypes {
  23. release {
  24. // TODO: Add your own signing config for the release build.
  25. // Signing with the debug keys for now, so `flutter run --release` works.
  26. signingConfig signingConfigs.release
  27. }
  28. }
  29. }
  30.  
  31.  
  32. ** android/key.properties **
  33. storePassword=saigopi@123
  34. keyPassword=saigopi@123
  35. keyAlias=sai
  36. storeFile=/Users/saigopinarimeti/Downloads/chat2x.jks
Add Comment
Please, Sign In to add comment