1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- apply from: rootProject.file('gradle/build_library.gradle')
- apply plugin: 'kotlin-android'
- apply plugin: 'kotlin-android-extensions'
- android {
- def miniAppPluginConfig = rootProject.ext.miniAppPluginConfig
- defaultConfig {
- buildConfigField "String", "PLUGIN_ID", "\"$miniAppPluginConfig.pluginId\""
- }
- }
- repositories {
- flatDir {
- dirs 'libs'
- }
- maven {
- url "https://maven.oa.com/nexus/content/repositories/google-maven/"
- }
- maven { url 'https://repo1.maven.org/maven2/' }
- }
- def saaaSDKVersionDepend = rootProject.ext.saaaSDKVersionDepend
- def libsDir = file("./libs")
- if (!file("$libsDir/com/tencent/luggage/wxa-standalone-open-runtime-SaaA-plugin-sdk/${saaaSDKVersionDepend}").exists()) {
- libsDir.mkdir()
- apply plugin: 'de.undercouch.download'
-
- def zipFileName = "wxa-standalone-open-runtime-SaaA-sdk-all-${saaaSDKVersionDepend}.zip"
- download.run {
- src "https://dldir1.qq.com/WechatWebDev/donut/android/pluginsdk/${zipFileName}"
- dest libsDir
- }
- def zipFilePath = "$libsDir/$zipFileName"
- copy {
- def subDir = 'localAar'
- from {
- zipTree(zipFilePath).matching { include "$subDir/**" }
- }
- into libsDir
- eachFile { fcp ->
- fcp.path = fcp.path.replaceFirst("^$subDir", '')
- }
- includeEmptyDirs false
- }
- file(zipFilePath).delete()
- }
- dependencies {
- implementation "androidx.exifinterface:exifinterface:1.1.0"
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- api "androidx.constraintlayout:constraintlayout:1.1.3"
- api 'com.google.android.material:material:1.0.0'
- compileOnly("com.tencent.luggage:wxa-standalone-open-runtime-SaaA-plugin-sdk:$saaaSDKVersionDepend") {}
- implementation('io.github.jeremyliao:live-event-bus-x:1.8.0')
- implementation 'com.umeng.umsdk:common:9.6.3'// 必选
- implementation 'com.umeng.umsdk:asms:1.8.0'// 必选
- }
- clearDuplicatedJniLibs([
- '**/jni/x86/**',
- '**/jni/x86_64/**',
- '**/jni/armeabi/**',
- '**/jni/**/libc++_shared.so'
- ])
- project.ext.pomDeps = [
- 'io.github.jeremyliao:live-event-bus-x' : '1.8.0',
- 'com.umeng.umsdk:common' : '9.6.3',
- 'com.umeng.umsdk:asms' : '1.8.0',
- ]
|