- 新建 AliyunPushManager 类,统一收口推送 SDK 初始化、设备注册、别名/标签绑定 - 实现指数退避重试机制(5s~5min),并加入时间窗内尝试次数熔断防止重试风暴 - 新增定时及主动状态检测(checkChannelStatus),通道关闭时自动重新初始化并注册 - 移除 BaseApplication 中分散的推送相关代码及 RxJava Observable 包装逻辑 - 移除 NetInterfaceManager 中直接调用 PushServiceFactory 的代码,改由管理器代理 - 移除 MainService 中已废弃的 aliyunPushInit 方法,网络恢复时调用状态检测替代 - 所有公共方法入口采用"快照决策→锁外执行"模式,避免持锁等待 SDK 回调导致死锁
78 lines
2.9 KiB
Groovy
78 lines
2.9 KiB
Groovy
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
buildscript {
|
|
ext.kotlin_version = '2.4.0'
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven { url 'https://jitpack.io' }
|
|
maven { url 'https://maven.google.com' }
|
|
maven { url 'https://developer.huawei.com/repo/' }
|
|
maven { url 'https://developer.hihonor.com/repo' }
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
|
maven { url "https://repo.boox.com/repository/maven-public/" }
|
|
}
|
|
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.13.2'
|
|
|
|
// NOTE: Do not place your application dependencies here; they belong
|
|
// in the individual module build.gradle files
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
configurations.all {
|
|
resolutionStrategy {
|
|
force 'androidx.constraintlayout:constraintlayout:2.0.4'
|
|
force 'androidx.core:core:1.5.0'
|
|
|
|
//for targetSdkVersion 29
|
|
force 'androidx.activity:activity:1.2.2'
|
|
force 'androidx.lifecycle:lifecycle-livedata:2.3.1'
|
|
force 'androidx.lifecycle:lifecycle-livedata-core:2.3.1'
|
|
force 'androidx.lifecycle:lifecycle-runtime:2.3.1'
|
|
force 'androidx.lifecycle:lifecycle-viewmodel:2.3.1'
|
|
force 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1'
|
|
force 'androidx.lifecycle:lifecycle-service:2.3.1'
|
|
force 'androidx.lifecycle:lifecycle-process:2.3.1'
|
|
force 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
|
force 'androidx.savedstate:savedstate:1.1.0'
|
|
force 'androidx.profileinstaller:profileinstaller:1.1.0'
|
|
force 'androidx.startup:startup-runtime:1.0.0'
|
|
force 'androidx.arch.core:core-runtime:2.1.0'
|
|
force 'androidx.sqlite:sqlite:2.1.0'
|
|
force 'androidx.sqlite:sqlite-framework:2.1.0'
|
|
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
maven { url 'https://jitpack.io' }
|
|
maven { url 'https://maven.google.com' }
|
|
maven { url 'https://developer.huawei.com/repo/' }
|
|
maven { url 'https://developer.hihonor.com/repo' }
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
maven { url 'https://maven.aliyun.com/repository/jcenter' }
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
|
maven { url 'https://maven.aliyun.com/repository/google' }
|
|
maven { url "https://repo.boox.com/repository/maven-public/" }
|
|
}
|
|
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs.add('-Xbootclasspath/p:app/libs/framework.jar')
|
|
}
|
|
}
|
|
}
|
|
|
|
//task clean(type: Delete) {
|
|
// delete rootProject.buildDir
|
|
//}
|