diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 980d7e5..d0a3ace 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -23,6 +23,16 @@ if (flutterVersionName == null) { apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +// 导入MobSDK +apply plugin: 'com.mob.sdk' + +MobSDK { + appKey "30dc33054b635" + appSecret "396e98c293130c9976fb7428b6b434d6" + + SecVerify {} + SMSSDK {} +} android { compileSdkVersion 28 @@ -33,21 +43,56 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "cn.zhios.zhiying_comm_example" + applicationId "cn.zhios.zhiying" minSdkVersion 19 targetSdkVersion 28 + aaptOptions.cruncherEnabled = false + aaptOptions.useNewCruncher = false + multiDexEnabled true versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + signingConfigs{ + release { + storeFile file("zhiying.jks") + storePassword "zhioscom" + keyAlias "zysh" + keyPassword "zhioscom" + v1SigningEnabled true + v2SigningEnabled true + } + } + + flavorDimensions "app" + buildTypes { release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' + signingConfig signingConfigs.release + } + debug { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt' + signingConfig signingConfigs.release } } + + dexOptions { + //最大堆内存 + javaMaxHeapSize "4g"//4g + //使用增量模式构建 + incremental true + //是否支持大工程模式 + jumboMode = true + //预编译 + preDexLibraries = false + //线程数 + threadCount = 8 + } + } flutter { diff --git a/example/android/app/private.keystore b/example/android/app/private.keystore new file mode 100755 index 0000000..fbecab9 Binary files /dev/null and b/example/android/app/private.keystore differ diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 6d629b4..31d91f9 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -10,7 +10,8 @@ android:name="io.flutter.app.FlutterApplication" android:label="zhiying_comm_example" android:icon="@mipmap/ic_launcher" - tools:replace="android:label"> + android:allowBackup="false" + tools:replace="android:label, android:allowBackup">