123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- def localProperties = new Properties()
- def localPropertiesFile = rootProject.file('local.properties')
- if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
- localProperties.load(reader)
- }
- }
- def flutterRoot = localProperties.getProperty('flutter.sdk')
- if (flutterRoot == null) {
- throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
- }
- def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
- if (flutterVersionCode == null) {
- flutterVersionCode = '1'
- }
- def flutterVersionName = localProperties.getProperty('flutter.versionName')
- if (flutterVersionName == null) {
- flutterVersionName = '1.0'
- }
- apply plugin: 'com.android.application'
- apply plugin: 'kotlin-android'
- apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
- android {
- compileSdkVersion 28
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- }
- lintOptions {
- disable 'InvalidPackage'
- }
- productFlavors {
- baidu {}
- douyin {}
- xiaomi {}
- huawei {}
- vivo {}
- oppo {}
- yinyongbao {}
- productFlavors.all { flavor ->
- flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
- }
- }
- defaultConfig {
- applicationId "com.tyty.liftmanager"
- minSdkVersion 21
- targetSdkVersion 30
- versionCode flutterVersionCode.toInteger()
- versionName flutterVersionName
- flavorDimensions "versionCode"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- ndk {
- //设置支持的SO库架构
- abiFilters 'armeabi-v7a'//, 'arm64-v8a', 'x86', 'x86_64'
- }
- manifestPlaceholders = [
- PACKAGE_NAME : applicationId,
- XG_ACCESS_ID : "2100320854",
- XG_ACCESS_KEY: "A7D99HE19CAX",
- HW_APPID : "10839500",
- JPUSH_PKGNAME : applicationId,
- JPUSH_APPKEY : "bd76ee7fb5dac9d04b12a521", // NOTE: JPush 上注册的包名对应的 Appkey.
- JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
- XIAOMI_APPKEY : "MI-5131748552829", // 小米平台注册的appkey,注意不要将前缀去掉 MI-appkey
- XIAOMI_APPID : "MI-2882303761517485829", // 小米平台注册的appid,注意不要将前缀去掉 MI-appid
- VIVO_APPKEY:"f3bfac7169bc3ab9d3e0c050e018d26a",
- VIVO_APPID:"100104950"
- ]
- multiDexEnabled true
- }
- signingConfigs {
- release {
- keyAlias 'liftmanager'
- keyPassword 'zhengmin123456'
- storeFile file('../../liftmanager.jks')
- storePassword 'zhengmin123456'
- }
- debug {
- keyAlias 'liftmanager'
- keyPassword 'zhengmin123456'
- storeFile file('../../liftmanager.jks')
- storePassword 'zhengmin123456'
- }
- }
- buildTypes {
- release {
- ndk {
- //这里要加上,否则debug包会出问题,后面三个为可选,x86建议加上不然部分模拟器回报错
- abiFilters "armeabi"
- // signingConfig signingConfigs.release
- }
- shrinkResources true
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- // Signing with the debug keys for now, so `flutter run --release` works.
- signingConfig signingConfigs.release
- }
- debug {
- ndk {
- //这里要加上,否则debug包会出问题,后面三个为可选,x86建议加上不然部分模拟器回报错
- abiFilters "armeabi", "armeabi-v7a","arm64-v8a", "x86"
- }
- signingConfig signingConfigs.debug
- }
- }
- }
- flutter {
- source '../..'
- }
- dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'androidx.test:runner:1.1.1'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
- implementation project(":libs")
- implementation 'cn.jiguang.sdk.plugin:xiaomi:4.0.6'//版本号和对应的JPush版本号相同
- implementation 'com.huawei.hms:push:5.0.2.300'
- //引入极光-华为插件,如果采用此配置,无需拷贝jpush-android-plugin-huawei-v3.x.x.jar文件,也无需配置cn.jpush.android.service.PluginHuaweiPlatformsService组件
- implementation 'cn.jiguang.sdk.plugin:huawei:4.0.6'
- implementation 'cn.jiguang.sdk.plugin:vivo:4.0.6'
- }
|