You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
3.1 KiB
Groovy

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

plugins {
id 'com.android.library'
}
ext {
// 是否要编译 uniapp 推送原生插件,默认为 false
// Whether to compile uniapp and push native pluginsdefault 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'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
if (!UNIAPP_MODEL) {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = [
'src/main/java',
'src/main/native/java'
]
} else {
manifest.srcFile 'src/main/uniapp/AndroidManifest.xml'
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
implementation "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.7.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.2.4123"
api 'com.tencent.liteav.tuikit:tuicore:1.1.23'
}
api project(':tuiconversation')
api project(':tuichat')
} else {
implementation 'com.alibaba:fastjson:1.1.46.android'
compileOnly fileTree(dir: 'libs', include: ['uniapp-v8-release.aar'])
}
}