123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- plugins {
- id 'com.android.library'
- }
- ext {
- // 是否要编译 uniapp 推送原生插件,默认为 false
- // Whether to compile uniapp and push native plugins,default is false
- UNIAPP_MODEL = false
- }
- android {
- compileSdkVersion 30
- buildToolsVersion "30.0.3"
- defaultConfig {
- minSdkVersion 16
- targetSdkVersion 30
- versionCode 1
- versionName "1.0"
- //buildConfigField "boolean", "UNIAPP_MODEL", String.valueOf(UNIAPP_MODEL)
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- preRelease {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- sourceSets {
- main {
- if (!UNIAPP_MODEL) {
- java.srcDirs = [
- 'src/main/java',
- 'src/main/native/java'
- ]
- } else {
- java.srcDirs = [
- 'src/main/java',
- 'src/main/uniapp/java'
- ]
- }
- }
- }
- }
- dependencies {
- implementation 'androidx.appcompat:appcompat:1.3.0'
- implementation 'com.google.android.material:material:1.3.0'
- implementation 'com.google.code.gson:gson:2.9.1'
- // Google FCM
- // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom)
- implementation platform('com.google.firebase:firebase-bom:31.2.3')
- // Firebase Cloud Messaging (Java)
- implementation 'com.google.firebase:firebase-messaging'
- // For an optimal experience using FCM, add the Firebase SDK
- // for Google Analytics. This is recommended, but not required.
- //implementation 'com.google.firebase:firebase-analytics'
- // xiaomi
- compileOnly ("com.tencent.timpush:xiaomi:7.7.5282")
- // meizu
- compileOnly("com.tencent.timpush:meizu:7.7.5282")
- // OPPO
- //腾讯这边暂时不是最新的oppo,先引用极光的
- compileOnly ("cn.jiguang.sdk.plugin:oppo:5.3.1")
- compileOnly files('libs/com.heytap.msp_3.4.0.aar')
- compileOnly ('commons-codec:commons-codec:1.15')
- // vivo
- // compileOnly ("com.tencent.timpush:vivo:7.7.5282")
- //腾讯这边暂时不是最新的vivo,先引用极光的
- compileOnly ("cn.jiguang.sdk.plugin:vivo:5.3.1")
- // 接入 VIVO 厂商
- // huawei
- compileOnly ('com.tencent.timpush:huawei:7.7.5282')
- compileOnly ('com.huawei.hms:push:6.12.0.300')
- // honor
- compileOnly ('com.tencent.timpush:honor:7.7.5282')
- if (!UNIAPP_MODEL) {
- def projects = this.rootProject.getAllprojects().stream().map { project -> project.name }.collect()
- println "all TUIOfflinePush projects : {$projects}"
- if (projects.contains("tuicore")) {
- api project(':tuicore')
- } else {
- api "com.tencent.imsdk:imsdk-plus:7.3.4358"
- api 'com.tencent.liteav.tuikit:tuicore:1.1.24'
- }
- } else {
- implementation 'com.alibaba:fastjson:1.1.46.android'
- compileOnly fileTree(dir: 'libs', include: ['uniapp-v8-release.aar'])
- }
- }
|