wjc
1 天以前 e7e48e1a65fdaa361e14e7e77e24043a63126bd6
app/build.gradle
@@ -3,6 +3,7 @@
    // 添加如下配置(华为极光推送)
    id 'com.huawei.agconnect'
}
apply plugin: 'com.google.gms.google-services' // 放在文件底部
//必须配置uni
def mfph = [
        //宿主包名
@@ -13,24 +14,25 @@
    signingConfigs {
        debug {
            storeFile file('../keystore/Untitled')
            keyAlias 'photovotaic'
            keyAlias 'hdlphotovotaic'
            storePassword '85521566'
            keyPassword '85521566'
        }
        release {
            storeFile file('../keystore/Untitled')
            keyAlias 'photovotaic'
            keyAlias 'hdlphotovotaic'
            storePassword '85521566'
            keyPassword '85521566'
        }
    }
    compileSdkVersion 34
    namespace 'com.hdl.photovoltaic'
    compileSdk 35
    defaultConfig {
        applicationId "com.hdl.photovoltaic"
        minSdkVersion 23
        targetSdkVersion 34
        versionCode 4
        versionName "1.1.0"//版本规则1.3是产品功能迭代用的,最后一位0是我们修复bug用的
        minSdk 23
        targetSdk 35
        versionCode 23
        versionName "2.0.1"//版本规则1.3是产品功能迭代用的,最后一位0是我们修复bug用的
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        manifestPlaceholders = mfph
@@ -62,10 +64,10 @@
        ]
    }
    // 保证其他的lib没有被preDex
    dexOptions {
        preDexLibraries = false
    }
//    // 保证其他的lib没有被preDex
//    dexOptions {
//        preDexLibraries = false
//    }
    repositories {
        flatDir {
            dirs 'libs'
@@ -84,13 +86,18 @@
//        abortOnError false
//    }
    packagingOptions {
        jniLibs {
            useLegacyPackaging true
        }
    }
    /**
     * 打包自动命名
     */
    android.applicationVariants.configureEach { variant ->
        variant.outputs.configureEach {
            outputFileName = "photovoltaic_v${versionName}_${generateTime()}_${getEnvironmentVersion(1)}.apk"
            outputFileName = "photovoltaic_v${versionName}_${generateTime()}_${getEnvironmentVersion(4)}.apk"
        }
    }
@@ -109,6 +116,7 @@
    buildFeatures {
        viewBinding true
        aidl true
        buildConfig true
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
@@ -153,16 +161,17 @@
    //二维码库
    implementation project(path: ':third-zxing')
    //Link本地库(在线依赖网络库)
    implementation 'com.hdl.android:pmsdk:1.0.9'
    implementation 'com.hdl.android:pmsdk:1.0.22'//22
//    implementation 'com.hdl.android:debugsdk:1.0.71'
    implementation project(path: ':sdk')
    implementation 'androidx.activity:activity:1.2.3'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
//    implementation 'org.greenrobot:eventbus:3.0.0'
    implementation 'com.hdl.hdlhttp:hxhttp:1.0.4'
    implementation 'com.hdl.hdlhttp:hxhttp:1.0.4'//1.0.4
    //okhttp 打印
    implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
@@ -183,13 +192,13 @@
    //********UniSDK必须添加的依赖 start********
    implementation "androidx.recyclerview:recyclerview:1.0.0"
    implementation 'com.alibaba:fastjson:1.2.66'//必须集成,fastjson功能需要
    implementation 'com.facebook.fresco:fresco:2.5.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:animated-gif:2.5.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:webpsupport:2.5.0'
    implementation 'com.facebook.fresco:animated-webp:2.5.0'
    implementation 'com.github.bumptech.glide:glide:4.9.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:fresco:3.6.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:animated-gif:3.6.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:webpsupport:3.6.0'
    implementation 'com.facebook.fresco:animated-webp:3.6.0'
    implementation 'com.github.bumptech.glide:glide:5.0.5'//必须集成,图片加载需要
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'androidx.webkit:webkit:1.3.0'//3.6.15版本之后 必须集成,用来支持暗黑模式
    implementation 'androidx.webkit:webkit:1.6.1'//3.6.15版本之后 必须集成,用来支持暗黑模式
    //********UniSDK必须添加的依赖 end********
    //NanoHTTPD搭建服务器
    implementation 'org.nanohttpd:nanohttpd:2.3.1'
@@ -206,13 +215,49 @@
    //分析和用户标签等功能(可选,集成极光分析SDK后,即可支持行为触发推送消息、推送转化率统计,用户行为分)
    implementation 'cn.jiguang.sdk:joperate:2.0.2'
    //若不集成厂商通道,可直接跳过以下依赖
    // 极光厂商插件版本与接入 JPush 版本保持一致,下同
    // 接入华为厂商
    implementation 'com.huawei.hms:push:6.9.0.300'
    implementation 'cn.jiguang.sdk.plugin:huawei:5.0.3'
    implementation 'com.huawei.agconnect:agconnect-core:1.9.1.301'
    //友盟
    implementation 'com.umeng.umsdk:common:9.6.8'// 必选
    implementation 'com.umeng.umsdk:asms:1.8.0'// 必选
//    implementation 'com.umeng.umsdk:apm:1.9.2' // 错误分析,目前不支持‌Android 15的‌16KB功能适配要求‌。‌
    //引入FCM(原生谷歌)
    implementation 'com.google.firebase:firebase-messaging:23.2.1'
    // 引入FCM
    implementation 'com.google.firebase:firebase-messaging:23.0.0' // 使用最新版本
    // 使用 ShortcutBadger 库,清除角标
    implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
    // 阿里云推送核心库
    implementation 'com.aliyun.ams:alicloud-android-push:3.9.3'
    //辅助通道
    implementation 'com.aliyun.ams:alicloud-android-third-push:3.9.2'
////华为依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-huawei:3.10.1'
//小米国内通道依赖
    implementation 'com.aliyun.ams:alicloud-android-third-push-xiaomi:3.9.2'
//OPPO依赖
    implementation 'com.aliyun.ams:alicloud-android-third-push-oppo:3.9.2'
////vivo依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-vivo:3.10.1'
////魅族依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-meizu:3.10.1'
////谷歌依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-fcm:3.10.1'
////荣耀依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-honor:3.10.1'
//    // 可选:如果你需要处理后台消息,可能需要以下依赖
//    implementation 'com.google.firebase:firebase-analytics:21.0.0'
//    // 接入 FCM 厂商
//    implementation 'com.google.firebase:firebase-messaging:23.1.2'
//    implementation 'cn.jiguang.sdk.plugin:fcm:5.0.3'