186 lines
6.1 KiB
Groovy
186 lines
6.1 KiB
Groovy
plugins {
|
||
alias(libs.plugins.androidApplication)
|
||
alias(libs.plugins.jetbrainsKotlinAndroid)
|
||
id 'kotlin-kapt'
|
||
id 'kotlin-parcelize'
|
||
}
|
||
|
||
android {
|
||
namespace 'com.cheng.blzb'
|
||
compileSdk 34
|
||
buildFeatures.buildConfig = true
|
||
|
||
lintOptions{
|
||
checkReleaseBuilds false
|
||
abortOnError false
|
||
}
|
||
|
||
defaultConfig {
|
||
applicationId "com.cheng.BoLe"
|
||
minSdk 26
|
||
targetSdk 34
|
||
versionCode 200
|
||
versionName "2.0.0"
|
||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
vectorDrawables {
|
||
useSupportLibrary true
|
||
}
|
||
ndk {
|
||
abiFilters 'arm64-v8a' //'armeabi-v7a'
|
||
}
|
||
multiDexEnabled true
|
||
|
||
flavorDimensions = ["channel"]
|
||
|
||
productFlavors {
|
||
xiaomi {}
|
||
oppo {}
|
||
vivo {}
|
||
huawei {}
|
||
honor {}
|
||
baidu {}
|
||
yyb {}
|
||
upgrade {}
|
||
bd_tg {}
|
||
dy_tg {}
|
||
tx_tg {}
|
||
ks_tg {}
|
||
dd_tg {}
|
||
sm_tg {}
|
||
oc_tg {}
|
||
}
|
||
|
||
productFlavors.configureEach {
|
||
dimension "channel"
|
||
manifestPlaceholders = [UMENG_CHANNEL: name]
|
||
}
|
||
|
||
manifestPlaceholders = [
|
||
GETUI_APPID : "ej3hUPd0LR8G1CzkNtyZS3",
|
||
GT_INSTALL_CHANNEL: "test",
|
||
]
|
||
}
|
||
|
||
// 配置签名信息
|
||
signingConfigs {
|
||
config {
|
||
storeFile file(RELEASE_STORE_FILE)
|
||
storePassword RELEASE_STORE_PASSWORD
|
||
keyAlias RELEASE_KEY_ALIAS
|
||
keyPassword RELEASE_KEY_PASSWORD
|
||
enableV1Signing true
|
||
enableV2Signing true
|
||
enableV3Signing true
|
||
}
|
||
}
|
||
|
||
buildTypes {
|
||
debug {
|
||
minifyEnabled false
|
||
shrinkResources false
|
||
signingConfig signingConfigs.config
|
||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||
}
|
||
release {
|
||
minifyEnabled true
|
||
shrinkResources true
|
||
signingConfig signingConfigs.config
|
||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||
}
|
||
}
|
||
|
||
applicationVariants.configureEach { variant ->
|
||
if (variant.buildType.name == "release") {
|
||
variant.outputs.forEach {
|
||
it.outputFileName = "bole_v${defaultConfig.versionName}_${variant.productFlavors[0].name}.apk"
|
||
}
|
||
|
||
variant.assembleProvider.get().doLast {
|
||
copy {
|
||
variant.outputs.forEach { file ->
|
||
//移动到指定文件夹
|
||
ant.move file: file.outputFile,
|
||
todir: "${project.rootDir}/apk"
|
||
}
|
||
}
|
||
}
|
||
|
||
variant.assembleProvider.get().doLast {
|
||
android.buildTypes.each { buildType ->
|
||
file("build/outputs/apk/$buildType").listFiles().each { channelFolder ->
|
||
if (channelFolder.isDirectory() && channelFolder.getName() != outputApkFolder) {
|
||
delete(channelFolder)
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
}
|
||
|
||
buildFeatures {
|
||
viewBinding true
|
||
}
|
||
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_1_8
|
||
targetCompatibility JavaVersion.VERSION_1_8
|
||
}
|
||
kotlinOptions {
|
||
jvmTarget = '1.8'
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
implementation fileTree(dir: "libs", include: ["*.jar", "*.aar"])
|
||
implementation project(':base')
|
||
|
||
implementation libs.androidx.appcompat
|
||
implementation libs.com.google.android.material.material
|
||
implementation libs.androidx.constraintlayout.constraintlayout
|
||
testImplementation libs.junit
|
||
androidTestImplementation libs.androidx.junit
|
||
androidTestImplementation libs.androidx.espresso.core
|
||
|
||
// implementation "androidx.core:core-splashscreen:1.0.1"
|
||
implementation 'com.jakewharton:disklrucache:2.0.2' // disklrucache
|
||
|
||
// tabLayout
|
||
implementation 'com.github.angcyo.DslTablayout:TabLayout:3.7.2'
|
||
implementation 'com.github.angcyo.DslTablayout:ViewPager1Delegate:3.7.2'
|
||
|
||
implementation 'com.github.FlyJingFish:GradientTextView:1.2.5' //渐变文字
|
||
implementation 'com.github.aitsuki:SwipeMenuRecyclerView:2.1.5' // 侧滑菜单
|
||
implementation 'com.github.chrisbanes:PhotoView:2.3.0' //图片浏览
|
||
implementation 'io.github.billywei01:fastaes:1.1.3' //解密
|
||
implementation 'com.github.gzu-liyujiang:Android_CN_OAID:4.2.12' //获取手机设备id
|
||
implementation 'com.google.android.flexbox:flexbox:3.0.0' //recyclerview flexbox
|
||
|
||
implementation files('libs/channelsdk-0.2.2.aar') //快手分包
|
||
implementation 'com.tencent.vasdolly:helper:3.0.4' //腾讯分包
|
||
implementation files('libs/humesdk-1.0.0.aar') //巨量分包
|
||
|
||
implementation 'com.getui:gysdk:3.1.7.0' //一键认证sdk
|
||
implementation 'com.getui:gtc:3.2.16.0' //个推公共库,如已接其他个推sdk则保留一个最高版本即可
|
||
|
||
//微信
|
||
implementation 'com.tencent.mm.opensdk:wechat-sdk-android:+'
|
||
//友盟
|
||
implementation 'com.umeng.umsdk:common:+'// 必选
|
||
implementation 'com.umeng.umsdk:asms:+'// 必选
|
||
implementation 'com.umeng.umsdk:apm:+'// U-APM产品包依赖,必选
|
||
implementation 'com.umeng.umsdk:share-core:+'//分享核心库,必选
|
||
implementation 'com.umeng.umsdk:share-wx:+' //微信完整版
|
||
|
||
implementation 'top.zibin:Luban:1.1.8' //图片压缩
|
||
implementation 'com.github.Dimezis:BlurView:version-2.0.6' //毛玻璃效果
|
||
implementation 'com.bytedance.ads:AppConvert:2.0.0' //巨量融合
|
||
implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:4.1.14' // 滚轮选择器
|
||
implementation 'com.github.lihangleo2:ShadowLayout:3.4.1' //阴影布局
|
||
//media3视频播放
|
||
implementation "androidx.media3:media3-exoplayer:1.4.1"
|
||
implementation "androidx.media3:media3-ui:1.4.1"
|
||
implementation "androidx.media3:media3-common:1.4.1"
|
||
} |