build.gradle 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. minifyEnabled true
  79. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  80. signingConfig signingConfigs.ting
  81. }
  82. }
  83. buildFeatures {
  84. viewBinding true
  85. dataBinding true
  86. }
  87. }
  88. dependencies {
  89. //AppCompat
  90. implementation "androidx.appcompat:appcompat:$rootProject.ext.appcompat_version"
  91. //ConstraintLayout
  92. implementation "androidx.constraintlayout:constraintlayout:$rootProject.ext.constraintlayout_version"
  93. //immersionbar
  94. implementation "com.geyifeng.immersionbar:immersionbar:$rootProject.ext.immersionbar_version"
  95. }
  96. flutter {
  97. source = "../.."
  98. }