build.gradle 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. buildscript {
  2. def miniAppConfigFilePath = "$rootDir/miniapp.json"
  3. def jsonFile = new File(miniAppConfigFilePath)
  4. def miniAppConfig = new groovy.json.JsonSlurper().parseText(jsonFile.text)
  5. ext.miniAppConfig = miniAppConfig
  6. def miniAppPluginConfigFilePath = "$rootDir/miniapp.plugin.json"
  7. def pluginJsonFile = new File(miniAppPluginConfigFilePath)
  8. def miniAppPluginConfig = new groovy.json.JsonSlurper().parseText(pluginJsonFile.text)
  9. ext.miniAppPluginConfig = miniAppPluginConfig
  10. ext.saaaSDKVersionDepend = miniAppPluginConfig.debugSaaAVersion // 依赖的主模块版本
  11. ext.versionName = miniAppPluginConfig.pluginVersion // 构建的插件版本
  12. ext {
  13. buildToolsVersion = "29.0.2"
  14. minSdkVersion = 21
  15. compileSdkVersion = 29
  16. targetSdkVersion = 28
  17. javaVersion = JavaVersion.VERSION_1_8
  18. kotlin_version = '1.3.72'
  19. }
  20. allprojects {
  21. repositories {
  22. google()
  23. jcenter()
  24. // 增加mavenCentral中央仓库
  25. mavenCentral()
  26. }
  27. }
  28. repositories {
  29. jcenter()
  30. mavenLocal()
  31. maven {
  32. url "http://mirrors.tencent.com/nexus/repository/maven-public/"
  33. }
  34. mavenCentral()
  35. google()
  36. }
  37. dependencies {
  38. classpath "com.android.tools.build:gradle:4.1.3"
  39. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  40. classpath 'de.undercouch:gradle-download-task:5.3.0'
  41. classpath "com.tencent.android.tpns:tpnsplugin:1.8.0"
  42. classpath 'com.github.kezong:fat-aar:1.3.8'
  43. }
  44. }
  45. subprojects {
  46. repositories {
  47. mavenLocal()
  48. maven {
  49. url "file://${rootProject.file("app/libs")}"
  50. }
  51. maven {
  52. url "http://mirrors.tencent.com/nexus/repository/maven-public/"
  53. }
  54. mavenCentral()
  55. google()
  56. }
  57. }