plugins { id "com.android.application" id "kotlin-android" // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } android { namespace = "com.eitchsyh.instrument.eitc_erm_dental_flutter" compileSdk = flutter.compileSdkVersion //ndkVersion = flutter.ndkVersion ndkVersion = "26.1.10909125" compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8 } packagingOptions { // Fixes duplicate libraries build issue, // when your project uses more than one plugin that depend on C++ libs. pickFirst 'lib/**/libc++_shared.so' } defaultConfig { applicationId = "com.eitchsyh.instrument" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. //minSdk = flutter.minSdkVersion minSdk = 24 targetSdk = flutter.targetSdkVersion versionCode = flutter.versionCode versionName = flutter.versionName ndk { //noinspection ChromeOsAbiSupport abiFilters /*"armeabi-v7a",*/ "arm64-v8a" } } externalNativeBuild { cmake { path file('src/main/cpp/CMakeLists.txt') version '3.22.1' } } signingConfigs { release { storeFile file('../key.keystore') storePassword 'guonenghuizhi888' keyAlias 'jsyg' keyPassword 'guonenghuizhi888' } } buildTypes { release { minifyEnabled true//开启混淆 shrinkResources true//去除无用资源 zipAlignEnabled true//资源对齐 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } } flavorDimensions "app" //多渠道打包配置,运行时需要加上flavor名字,例如flutter run --flavor hsjk productFlavors { //慧视健康,默认 hsjk { dimension = "app" } //慧视通 hst { dimension = "app" applicationId = "com.hst.instrument" } } } flutter { source = "../.." }