apply plugin: 'com.android.application' // android res guard 资源混淆脚本 apply from: 'and_res_guard.gradle' apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'com.huawei.agconnect' android { compileSdkVersion 29 defaultConfig { applicationId "com.xuanyi.accompany" minSdkVersion 19 targetSdkVersion 29 versionCode Integer.valueOf(version_code) versionName version_name testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" multiDexEnabled true ndk { //设置支持的SO库架构 if (ndk_abi_filters == "x86") { abiFilters "x86" } else if (ndk_abi_filters == "arm_x86") { abiFilters "armeabi-v7a", "x86" } else { abiFilters "armeabi-v7a" } } flavorDimensions 'default' } //在apk文件后边生成版本号信息 android.applicationVariants.all { variant -> variant.outputs.all { def date = new Date().format("MMddHHmm", TimeZone.getTimeZone("GMT+08")) outputFileName = "accompany_" + buildType.name + "_v${Boolean.parseBoolean(with_jenkins) ? "" : (defaultConfig.versionName + "-" + date)}.apk" } } lintOptions { abortOnError false disable 'MissingTranslation' disable 'ExtraTranslation' } dexOptions { javaMaxHeapSize "1g" jumboMode = true } dataBinding { enabled = true } packagingOptions { exclude 'lib/armeabi-v7a/libagora-crypto.so' } signingConfigs { v2 { storeFile file('../66pw.jks') storePassword "accompanyplay" keyAlias "66accompany" keyPassword "accompanyplay" v2SigningEnabled true v1SigningEnabled true } v1 { storeFile file('../66pw.jks') storePassword "accompanyplay" keyAlias "66accompany" keyPassword "accompanyplay" v2SigningEnabled false v1SigningEnabled true } } sourceSets { main { java.srcDirs = [ 'src/main/java', 'src/module_public_chat_hall/java', 'src/module_upgrade_app/java', 'src/module_mentoring_relationship/java', 'src/module_labour_union/java', 'src/module_room_chat/java', 'src/model_customer_server/java', 'src/module_music/java', 'src/module_mini_world/java', 'src/module_lottery_dialog/java', 'src/module_bank_card/java', 'src/module_super_admin/java', 'src/module_treasure_box/java', 'src/module_community/java', 'src/module_album/java', 'src/module_quick_pass/java' ] res.srcDirs = [ 'src/main/res', 'src/common/res', 'src/module_public_chat_hall/res', 'src/module_upgrade_app/res', 'src/module_mentoring_relationship/res', 'src/module_labour_union/res', 'src/module_room_chat/res', 'src/model_customer_server/res', 'src/module_music/res', 'src/module_mini_world/res', 'src/module_lottery_dialog/res', 'src/module_bank_card/res', 'src/module_super_admin/res', 'src/module_treasure_box/res', 'src/module_community/res', 'src/module_album/res', 'src/module_quick_pass/res' ] } } buildTypes { release { // buildConfigField "String", "BASE_URL", "\"https://www.erbanyy.com/\"" buildConfigField "String", "BASE_URL", "\"https://api.zhongjialx.com/\"" buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL" buildConfigField "String", "BASE_URL_STAGING", "BASE_URL" buildConfigField "String", "BASE_URL_RELEASE", "BASE_URL" minifyEnabled true shrinkResources true signingConfig signingConfigs.v2 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } staging { buildConfigField "String", "BASE_URL", "\"https://api.zhongjialx.com/\"" buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL" buildConfigField "String", "BASE_URL_STAGING", "BASE_URL" buildConfigField "String", "BASE_URL_RELEASE", "BASE_URL" minifyEnabled true shrinkResources true signingConfig signingConfigs.v2 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' matchingFallbacks = ['staging', 'release'] } debug { buildConfigField "String", "BASE_URL", "\"http://120.79.211.243/\"" //120.79.211.243 192.168.1.105:8079 192.168.10.5:8082 // buildConfigField "String", "BASE_URL", "\"http://apibeta.qxjiaoyou.com/\"" buildConfigField "String", "BASE_URL_DEBUG", "BASE_URL" buildConfigField "String", "BASE_URL_STAGING", "\"https://api.zhongjialx.com/\"" buildConfigField "String", "BASE_URL_RELEASE", "\"https://api.zhongjialx.com/\"" minifyEnabled false shrinkResources false signingConfig signingConfigs.v2 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } productFlavors { accompany { dimension 'default' } } buildToolsVersion = '28.0.3' } def supportLibraryVersion = "27.1.1" def Lombok = "1.16.20" dependencies { api fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' }) api 'androidx.recyclerview:recyclerview:1.1.0' api 'androidx.cardview:cardview:1.0.0' api 'androidx.gridlayout:gridlayout:1.0.0' api 'androidx.multidex:multidex:2.0.1' debugApi "com.squareup.leakcanary:leakcanary-android:1.6.3" releaseApi "com.squareup.leakcanary:leakcanary-android-no-op:1.6.3" stagingApi "com.squareup.leakcanary:leakcanary-android-no-op:1.6.3" api "com.orhanobut:dialogplus:1.11@aar" api "com.readystatesoftware.systembartint:systembartint:1.0.4" api "com.rengwuxian.materialedittext:library:2.1.4" api "com.github.flavienlaurent.datetimepicker:library:0.0.2" api "com.darsh.multipleimageselect:multipleimageselect:1.0.4" api "me.shaohui.advancedluban:library:1.3.5" api "pl.droidsonroids.gif:android-gif-drawable:1.2.7" api "com.makeramen:roundedimageview:2.3.0" api "com.jzxiang.pickerview:TimePickerDialog:1.0.1" api "com.github.zyyoona7:EasyPopup:1.0.2" api "com.github.donkingliang:LabelsView:1.2.0" api "com.github.yyued:SVGAPlayer-Android:2.5.3" implementation "com.orhanobut:logger:2.2.0" api "com.ms-square:expandableTextView:0.1.4" api "com.jakewharton:butterknife:10.1.0" annotationProcessor "com.jakewharton:butterknife-compiler:10.1.0" implementation "com.llew.huawei:verifier:1.0.3" annotationProcessor 'androidx.annotation:annotation:1.1.0' api "com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar" api "com.nex3z:flow-layout:1.2.2" api project(':core') implementation 'com.github.qiujayen:sticky-layoutmanager:1.0.1' implementation 'com.github.chenBingX:SuperTextView:v3.0.0' //支付密码输入框 api 'com.jungly:gridPasswordView:0.3' api 'com.google.android:flexbox:1.1.0' compileOnly "org.projectlombok:lombok:${Lombok}" annotationProcessor "org.projectlombok:lombok:${Lombok}" api 'androidx.lifecycle:lifecycle-extensions:2.2.0' implementation 'nl.dionsegijn:konfetti:1.1.2' // 华为推送 // api(name: 'base-2.6.1.301', ext: 'aar') // api(name: 'push-2.6.1.301', ext: 'aar') // 魅族推送 implementation 'com.meizu.flyme.internet:push-internal:3.9.0@aar' // vivo推送 implementation files("libs/vivo_pushsdk-v2.9.0.0.aar") //阿里云实名认证 api files('aliyun-libs/windvane-min-8.0.3.2.3.jar') api(name: 'oss-android-sdk-2.9.2', ext: 'aar') api(name: 'rpsdk-4.0.4', ext: 'aar') api(name: 'SecurityGuardSDK-external-release-5.4.193-preInstall', ext: 'aar') api(name: 'SecurityBodySDK-external-release-5.4.112-preInstall', ext: 'aar') //数字滚动效果 implementation 'com.github.YvesCheung:RollingText:1.2.3' // 引入原有第三方裁图源码,方便修改 api project(':android_crop_lib') //网易七鱼客服 implementation 'com.qiyukf.unicorn:unicorn:4.9.1' //rx权限请求框架 implementation('com.github.tbruyelle:rxpermissions:0.10.2') { exclude group: 'io.reactivex.rxjava2' } //验证码控件 https://github.com/JingYeoh/VercodeEditText implementation 'com.justkiddingbaby:vercodeedittext:1.1.0' //高德地图 implementation 'com.amap.api:location:3.3.0' implementation 'it.sephiroth.android.library.imagezoom:library:1.0.4' // 易盾一键登录 implementation(name: 'quicklogin_libary-external-release', ext: 'aar') implementation(name: 'CMCCSSOSDK-WY', ext: 'aar') implementation(name: 'Ui-factory_oauth_mobile_3.8.3.1', ext: 'aar') implementation(name: 'CTAccount_sdk_api_v3.7.0_all', ext: 'aar') implementation 'com.github.fodroid:XRadioGroup:v1.5' implementation files('libs/msa_mdid_1.0.13.aar') implementation "androidx.core:core-ktx:+" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.huawei.hms:push:4.0.4.301' implementation fileTree(dir: 'libs', include: ['oppo-mcssdk-2.0.2.jar']) } repositories { flatDir { dirs 'aliyun-libs', 'quick-pass-libs','com.huawei.agconnect' } mavenCentral() }