build.gradle 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. apply from: rootProject.file('gradle/build_library.gradle')
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'com.kezong.fat-aar'
  5. android {
  6. def miniAppPluginConfig = rootProject.ext.miniAppPluginConfig
  7. defaultConfig {
  8. buildConfigField "String", "PLUGIN_ID", "\"$miniAppPluginConfig.pluginId\""
  9. }
  10. sourceSets {
  11. main {
  12. jniLibs.srcDirs = ["libs"]
  13. }
  14. }
  15. }
  16. repositories {
  17. flatDir {
  18. dirs 'libs'
  19. }
  20. maven { url "https://maven.oa.com/nexus/content/repositories/google-maven/" }
  21. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } //gradle-plugin
  22. maven { url 'https://maven.aliyun.com/repository/google' } //google
  23. maven { url 'https://maven.aliyun.com/repository/public' } //public
  24. maven { url 'https://maven.aliyun.com/repository/jcenter' } //jcenter
  25. }
  26. def saaaSDKVersionDepend = rootProject.ext.saaaSDKVersionDepend
  27. def libsDir = file("./libs")
  28. if (!file("$libsDir/com/tencent/luggage/wxa-standalone-open-runtime-SaaA-plugin-sdk/${saaaSDKVersionDepend}").exists()) {
  29. libsDir.mkdir()
  30. apply plugin: 'de.undercouch.download'
  31. def zipFileName = "wxa-standalone-open-runtime-SaaA-sdk-all-${saaaSDKVersionDepend}.zip"
  32. download.run {
  33. src "https://dldir1.qq.com/WechatWebDev/donut/android/pluginsdk/${zipFileName}"
  34. dest libsDir
  35. }
  36. def zipFilePath = "$libsDir/$zipFileName"
  37. copy {
  38. def subDir = 'localAar'
  39. from {
  40. zipTree(zipFilePath).matching { include "$subDir/**" }
  41. }
  42. into libsDir
  43. eachFile { fcp ->
  44. fcp.path = fcp.path.replaceFirst("^$subDir", '')
  45. }
  46. includeEmptyDirs false
  47. }
  48. file(zipFilePath).delete()
  49. }
  50. fataar {
  51. transitive = true
  52. }
  53. dependencies {
  54. implementation "androidx.exifinterface:exifinterface:1.1.0"
  55. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  56. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  57. api "androidx.constraintlayout:constraintlayout:1.1.3"
  58. api 'com.google.android.material:material:1.0.0'
  59. compileOnly("com.tencent.luggage:wxa-standalone-open-runtime-SaaA-plugin-sdk:$saaaSDKVersionDepend") {}
  60. implementation('io.github.jeremyliao:live-event-bus-x:1.8.0')
  61. implementation('io.github.FailedToRead:intermodal-release:1.0.1')
  62. implementation('io.github.FailedToRead:oaid_sdk_1.0.25:1.0.1')
  63. implementation('io.github.FailedToRead:huawei-maven-release:1.0.2')
  64. implementation 'com.squareup.okhttp3:okhttp:4.2.0'
  65. implementation 'com.google.code.gson:gson:2.8.7'
  66. // implementation 'com.alipay.sdk:alipaysdk-android:+@aar'
  67. // implementation project(path: ':LocalRepo:intermodal-release', configuration: 'default')
  68. // implementation project(path: ':LocalRepo:oaid_sdk', configuration: 'default')
  69. }
  70. clearDuplicatedJniLibs([
  71. '**/jni/x86/**',
  72. '**/jni/x86_64/**',
  73. '**/jni/armeabi/**',
  74. '**/jni/**/libc++_shared.so'
  75. ])
  76. project.ext.pomDeps = [
  77. 'io.github.jeremyliao:live-event-bus-x' : '1.8.0',
  78. 'io.github.FailedToRead:intermodal-release': '1.0.1',
  79. 'io.github.FailedToRead:oaid_sdk_1.0.25' : '1.0.1',
  80. 'io.github.FailedToRead:huawei-maven-release' : '1.0.2'
  81. ]