build.gradle 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. plugins {
  2. id "com.android.application"
  3. id "kotlin-android"
  4. // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
  5. id "dev.flutter.flutter-gradle-plugin"
  6. }
  7. def localProperties = new Properties()
  8. def localPropertiesFile = rootProject.file("local.properties")
  9. if (localPropertiesFile.exists()) {
  10. localPropertiesFile.withReader("UTF-8") { reader ->
  11. localProperties.load(reader)
  12. }
  13. }
  14. def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
  15. if (flutterVersionCode == null) {
  16. flutterVersionCode = "1"
  17. }
  18. def flutterVersionName = localProperties.getProperty("flutter.versionName")
  19. if (flutterVersionName == null) {
  20. flutterVersionName = "1.0"
  21. }
  22. android {
  23. namespace = "com.atmob.elec_asst"
  24. compileSdk = flutter.compileSdkVersion
  25. ndkVersion = flutter.ndkVersion
  26. compileOptions {
  27. sourceCompatibility = JavaVersion.VERSION_1_8
  28. targetCompatibility = JavaVersion.VERSION_1_8
  29. }
  30. defaultConfig {
  31. // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  32. applicationId = "com.atmob.elec_asst"
  33. // You can update the following values to match your application needs.
  34. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
  35. minSdk = flutter.minSdkVersion
  36. targetSdk = flutter.targetSdkVersion
  37. versionCode = flutterVersionCode.toInteger()
  38. versionName = flutterVersionName
  39. }
  40. signingConfigs {
  41. debug {
  42. storeFile file("keystore/electronic.jks")
  43. storePassword "electronic888"
  44. keyAlias "electronic"
  45. keyPassword "electronic888"
  46. }
  47. release {
  48. storeFile file("keystore/electronic.jks")
  49. storePassword "electronic888"
  50. keyAlias "electronic"
  51. keyPassword "electronic888"
  52. }
  53. }
  54. buildTypes {
  55. release {
  56. // TODO: Add your own signing config for the release build.
  57. // Signing with the debug keys for now, so `flutter run --release` works.
  58. signingConfig signingConfigs.release
  59. }
  60. }
  61. }
  62. flutter {
  63. source = "../.."
  64. }