build.gradle 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 = rootProject.ext.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 = rootProject.ext.applicationId
  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 = rootProject.ext.minSdkVersion
  36. targetSdk = rootProject.ext.targetSdkVersion
  37. versionCode = flutterVersionCode.toInteger()
  38. versionName = flutterVersionName
  39. }
  40. signingConfigs {
  41. ting {
  42. storeFile file("keystore/ting.jks")
  43. storePassword "ting888"
  44. keyAlias "ting"
  45. keyPassword "ting888"
  46. }
  47. ling {
  48. storeFile file("keystore/ling.jks")
  49. storePassword "ling888"
  50. keyAlias "ling"
  51. keyPassword "ling888"
  52. }
  53. juan {
  54. storeFile file("keystore/juan.jks")
  55. storePassword "juan888"
  56. keyAlias "juan"
  57. keyPassword "juan888"
  58. }
  59. you {
  60. storeFile file("keystore/you.jks")
  61. storePassword "you888"
  62. keyAlias "you"
  63. keyPassword "you888"
  64. }
  65. }
  66. buildTypes {
  67. debug {
  68. // Note: The debug build type must have the same signing config as the main build type.
  69. signingConfig signingConfigs.ting
  70. }
  71. release {
  72. // TODO: Add your own signing config for the release build.
  73. // Signing with the debug keys for now, so `flutter run --release` works.
  74. signingConfig signingConfigs.ting
  75. }
  76. }
  77. }
  78. flutter {
  79. source = "../.."
  80. }