build.gradle 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. android {
  8. namespace = "com.eitchsyh.instrument.eitc_erm_dental_flutter"
  9. compileSdk = flutter.compileSdkVersion
  10. //ndkVersion = flutter.ndkVersion
  11. ndkVersion = "26.1.10909125"
  12. compileOptions {
  13. sourceCompatibility = JavaVersion.VERSION_1_8
  14. targetCompatibility = JavaVersion.VERSION_1_8
  15. }
  16. kotlinOptions {
  17. jvmTarget = JavaVersion.VERSION_1_8
  18. }
  19. packagingOptions {
  20. // Fixes duplicate libraries build issue,
  21. // when your project uses more than one plugin that depend on C++ libs.
  22. pickFirst 'lib/**/libc++_shared.so'
  23. }
  24. defaultConfig {
  25. applicationId = "com.eitchsyh.instrument"
  26. // You can update the following values to match your application needs.
  27. // For more information, see: https://flutter.dev/to/review-gradle-config.
  28. //minSdk = flutter.minSdkVersion
  29. minSdk = 24
  30. targetSdk = flutter.targetSdkVersion
  31. versionCode = flutter.versionCode
  32. versionName = flutter.versionName
  33. ndk {
  34. //noinspection ChromeOsAbiSupport
  35. abiFilters /*"armeabi-v7a",*/ "arm64-v8a"
  36. }
  37. }
  38. signingConfigs {
  39. release {
  40. storeFile file('../key.keystore')
  41. storePassword 'guonenghuizhi888'
  42. keyAlias 'jsyg'
  43. keyPassword 'guonenghuizhi888'
  44. }
  45. }
  46. buildTypes {
  47. release {
  48. minifyEnabled true//开启混淆
  49. shrinkResources true//去除无用资源
  50. zipAlignEnabled true//资源对齐
  51. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  52. signingConfig signingConfigs.release
  53. }
  54. }
  55. flavorDimensions "app"
  56. //多渠道打包配置,运行时需要加上flavor名字,例如flutter run --flavor hsjk
  57. productFlavors {
  58. //慧视健康,默认
  59. hsjk {
  60. dimension = "app"
  61. }
  62. //慧视通
  63. hst {
  64. dimension = "app"
  65. applicationId = "com.hst.instrument"
  66. }
  67. }
  68. }
  69. flutter {
  70. source = "../.."
  71. }