apply plugin: 'com.android.application' apply plugin: 'com.huawei.agconnect' apply plugin: 'com.jakewharton.hugo' apply plugin: 'com.mob.sdk' def releaseTime() { return new Date().format("yy-MM-dd_HHmm") } android { // useLibrary 'org.apache.http.legacy' compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) signingConfigs { //jianyou { // keyAlias 'jianyou' // keyPassword '88888888' // storeFile file('jianyou.jks') // storePassword '88888888' //} yisai { keyAlias 'yisai' keyPassword 'yisai88' storeFile file('yisai.jks') storePassword 'yisai88' } flavorDimensions "channel" } defaultConfig { applicationId project.GROUP minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION) targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION) versionName project.VERSION_NAME versionCode Integer.parseInt(project.VERSION_CODE) testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true //"mips","mips64" ,'x86','x86_64','arm64-v8a' ndk { abiFilters 'armeabi-v7a' } signingConfig signingConfigs.yisai } compileOptions { targetCompatibility 1.8 sourceCompatibility 1.8 } buildTypes { // TODO 删 debug { signingConfig signingConfigs.yisai // buildConfigField "String", "URL", "\"https://apitest.tx.kidxin.com/\"" // buildConfigField "String", "BASE_URL", "\"https://apitest.tx.kidxin.com/getway/\"" // buildConfigField "String", "MQTT_BORKER", "\"tcp://apitest.tx.kidxin.com:1883\"" } release { minifyEnabled false aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.yisai //buildConfigField "String", "URL", "\"https://api.tx.kidxin.com/\"" //buildConfigField "String", "BASE_URL", "\"https://api.tx.kidxin.com/getway/\"" //buildConfigField "String", "MQTT_BORKER", "\"tcp://push.tx.kidxin.com:1883\"" } } configurations.all { resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1' } MobSDK { appKey "322987b7e73df" appSecret "5ef55039c3d46dbc347f71607dae4a0f" SMSSDK { } } dexOptions { javaMaxHeapSize "4g" } productFlavors { //百度 //jianyou { // dimension "channel" // applicationId 'com.ecellsz.watch.guard' // manifestPlaceholders = [GAODE_VALUE : "53b6d1f9f60020e6288b2d91e5c5bbd2", // MARKET_CHANNEL: "lekangshouhu", // BAIDU_STAT : "I1cbWIiKyfMxArp8bWoOdVxYYTH0iCmS"] // // signingConfig signingConfigs.yisai //} yisai { dimension "channel" applicationId 'com.ecellsz.watch.guard' manifestPlaceholders = [GAODE_VALUE : "53b6d1f9f60020e6288b2d91e5c5bbd2", // 易赛:53b6d1f9f60020e6288b2d91e5c5bbd2 MARKET_CHANNEL: "lekangshouhu", // 乐听: b8d6e2ccdeb88ac64f88e1e6ad332821 BAIDU_STAT : "I1cbWIiKyfMxArp8bWoOdVxYYTH0iCmS"] // 新艺:10149d4f2aa6b384e7ac8a01abd5fe98 signingConfig signingConfigs.yisai } } android.applicationVariants.all { variant -> variant.outputs.all { def version = variant.versionName def code = variant.versionCode def channel = variant.name if(channel.contains("Release")){ if (channel.contains("yisai")) { channel = "" } if(channel.equals("")){ outputFileName ="LKSH_"+"V${version}_C${code}_${releaseTime()}_gz.apk" } } } } lintOptions { checkReleaseBuilds false abortOnError false } dataBinding { enabled = true } } ext { supportLibraryVersion = project.ANDROID_SUPPORT_LIBRARY_VERSION } configurations { all*.exclude group: 'com.android.support', module: 'support-v13' } repositories { flatDir { dirs project(':baselibrary').file('libs') } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) implementation 'com.github.huburt-Hu:NewbieGuide:v1.0.2' annotationProcessor 'com.google.dagger:dagger-compiler:2.10' annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0' implementation 'com.jakewharton:butterknife:9.0.0' api project(':baselibrary') api project(':chatlibrary') api project(':mine') api project(':deviceinfo') implementation 'com.android.support.constraint:constraint-layout:1.0.2' testImplementation 'junit:junit:4.12' yisaiApi project(':adddevice') yisaiApi project(':location') //implementation 'com.tencent.bugly:crashreport:latest.release' implementation 'com.huawei.hms:push:5.0.4.302' implementation 'com.huawei.hms:opendevice:5.0.4.300' implementation 'com.huawei.hms:ads-identifier:3.4.34.301' //implementation 'com.huawei.agconnect:agconnect-core:1.4.2.301' //implementation 'com.huawei.agconnect:agconnect-appmessaging:1.4.2.301' //===============================监控依赖============================================ //implementation 'cn.hikyson.godeye:godeye-core:3.1.2' //debugImplementation 'cn.hikyson.godeye:godeye-monitor:3.1.2' //releaseImplementation 'cn.hikyson.godeye:godeye-monitor-no-op:3.1.2' //implementation 'cn.hikyson.godeye:godeye-toolbox:3.1.2' }