ext.mainApp = true //设置为true,表示此module为主app module,一直以application方式编译 apply from: rootProject.file('cc-settings.gradle') apply from: rootProject.file('common-build.gradle') android { compileSdkVersion rootProject.compile_sdk_version defaultConfig { applicationId rootProject.application_id minSdkVersion rootProject.min_sdk_version targetSdkVersion rootProject.target_sdk_version versionCode rootProject.application_version_code versionName rootProject.application_version_name manifestPlaceholders = [ JPUSH_PKGNAME: 'com.quansu.creativity', JPUSH_APPKEY : "315cad416dd39b8a8e2b5a92",//值来自开发者平台取得的AppKey JPUSH_CHANNEL: "default_developer", ] ndk { //选择要添加的对应 cpu 类型的 .so 库。 // abiFilters "armeabi","armeabi-v7a","arm64-v8a","x86" abiFilters 'armeabi-v7a' // 还可以添加 'x86', 'x86_64', 'mips', 'mips64' } } signingConfigs { release { keyAlias "xianglian" keyPassword "xianglian@###121" storeFile file("../xianglian.jks") storePassword "xianglian@###121" v2SigningEnabled true } } buildTypes { debug { signingConfig signingConfigs.release versionNameSuffix "-" + name } release { debuggable false minifyEnabled true zipAlignEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } } repositories{ flatDir { dirs 'libs' } } //指定release APK名称 applicationVariants.all { variant -> variant.outputs.all { // 输出apk名称为 1.0_vivo.apk def fileName = "${variant.productFlavors[0].name}_${defaultConfig.versionName}.apk" outputFileName = fileName } } flavorDimensions "version" //指定渠道 productFlavors { dev {} vivo {} oppo {} huawei {} xiaomi {} coolapk {} yingyongbao {} } // 批量渠道包值替换 //通过脚本获取所有渠道 //在Terminal控制台输入gradlew assembleRelease开始打包 //包生成在build-->outputs-->apk文件夹 productFlavors.all { // 遍历替换所有渠道 flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL: name] } // //Terminal窗口输入 //打包wandoujia渠道的release版本,执行如下命令 // gradlew assembleWandoujiaRelease //打包wandoujia渠道的debug版本,执行如下命令 // gradlew assembleWandoujiaDebug // 只打wandoujia渠道版会生成wandoujia渠道的Release和Debug版本 // gradlew assembleWandoujia //打全部Release版本 // gradlew assembleRelease compileOptions { targetCompatibility 1.8 sourceCompatibility 1.8 } kotlinOptions { jvmTarget = '1.8' } android.buildFeatures { dataBinding = true viewBinding = false } } dependencies { implementation project(':base') implementation project(path: ':update') // implementation project(path: ':alipay') // addComponent 'umeng' // addComponent 'jpush' // addComponent 'lookimg' //首页导航图 implementation 'cn.bingoogolapple:bga-banner:2.2.6@aar'//首页导航图 //微信sdk implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:+' //侧滑删除 // implementation 'com.github.mcxtzhang:SwipeDelMenuLayout:V1.2.5' //时间选择器 implementation 'com.contrarywind:Android-PickerView:4.1.9' //选择图片 implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.6.0' //高仿微信朋友圈图片展示效果 ImageWatcher implementation 'com.github.iielse:ImageWatcher:2.1.2' // implementation 'cat.ereza:customactivityoncrash:2.3.0' //二维码扫描页面 implementation 'cn.yipianfengye.android:zxing-library:2.2' implementation 'androidx.multidex:multidex:2.0.0' implementation 'com.github.bumptech.glide:glide:4.13.2' annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2' //阿里云金融级实名认证 implementation files('libs/android-aliyunface-sdk-release-1.6.5-20220704102254.aar') implementation files('libs/android-aliyunbasicstl-sdk-release-1.6.5-20220704102254.aar') implementation files('libs/android-aliyuncomm-sdk-release-1.6.5-20220704102254.aar') implementation files('libs/android-aliyunocr-sdk-release-1.6.5-20220704102254.aar') implementation files('libs/photinus-1.0.1.220217162928.aar') implementation files('libs/Android-AliyunDevice-FG-10022.2.aar') implementation files('libs/APSecuritySDK-DeepSec-7.0.1.20220617.jiagu.aar') implementation files('libs/tygerservice-1.0.0.220618105311.aar') implementation 'com.squareup.okhttp3:okhttp:4.10.0' implementation 'com.squareup.okio:okio:1.14.0' implementation 'com.alibaba:fastjson:1.2.62' implementation 'com.aliyun.dpa:oss-android-sdk:+' testImplementation 'junit:junit:4.+' // //视频 // implementation 'com.github.JarvanMo:ExoVideoView:2.1.6' // implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer:v8.3.4-release-jitpack' implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.3.4-release-jitpack' implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-arm64:v8.3.4-release-jitpack' //支付宝 implementation 'com.alipay.sdk:alipaysdk-android:+@aar' //为了使用 EncodingUtils 在高版本已过时 implementation 'org.apache.httpcomponents:httpcore:4.4.4' }