build.gradle 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. ndk {
  40. //noinspection ChromeOsAbiSupport
  41. abiFilters "arm64-v8a"
  42. }
  43. }
  44. signingConfigs {
  45. ting {
  46. storeFile file("keystore/ting.jks")
  47. storePassword "ting888"
  48. keyAlias "ting"
  49. keyPassword "ting888"
  50. }
  51. ling {
  52. storeFile file("keystore/ling.jks")
  53. storePassword "ling888"
  54. keyAlias "ling"
  55. keyPassword "ling888"
  56. }
  57. juan {
  58. storeFile file("keystore/juan.jks")
  59. storePassword "juan888"
  60. keyAlias "juan"
  61. keyPassword "juan888"
  62. }
  63. you {
  64. storeFile file("keystore/you.jks")
  65. storePassword "you888"
  66. keyAlias "you"
  67. keyPassword "you888"
  68. }
  69. }
  70. buildTypes {
  71. debug {
  72. // Note: The debug build type must have the same signing config as the main build type.
  73. signingConfig signingConfigs.ting
  74. }
  75. release {
  76. // TODO: Add your own signing config for the release build.
  77. // Signing with the debug keys for now, so `flutter run --release` works.
  78. signingConfig signingConfigs.ting
  79. }
  80. }
  81. }
  82. flutter {
  83. source = "../.."
  84. }