12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- 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.tpns:xiaomi:1.3.7.2-release")
- // meizu
- compileOnly("com.tencent.tpns:meizu:1.3.3.3-release")
- // OPPO
- compileOnly ("com.tencent.tpns:oppo:1.3.3.3-release")
- compileOnly ('commons-codec:commons-codec:1.15')
- // vivo
- compileOnly ("com.tencent.tpns:vivo:1.3.3.3-release")
- // huawei
- compileOnly ('com.tencent.tpns:huawei:1.3.7.2-release')
- compileOnly ('com.huawei.hms:push:6.10.0.300')
- // honor
- compileOnly ('com.tencent.tpns:honor:1.3.3.3-release')
- 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'])
- }
- }
|