build.gradle 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 = miniAppConfig.targetSdkVersion
  17. javaVersion = JavaVersion.VERSION_1_7
  18. kotlin_version = '1.6.21'
  19. }
  20. repositories {
  21. mavenLocal()
  22. maven {
  23. url "http://mirrors.tencent.com/nexus/repository/maven-public/"
  24. }
  25. maven { url 'https://repo1.maven.org/maven2/' }
  26. mavenCentral()
  27. google()
  28. }
  29. dependencies {
  30. classpath "com.android.tools.build:gradle:4.1.3"
  31. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  32. classpath 'de.undercouch:gradle-download-task:5.3.0'
  33. // classpath "com.tencent.android.tpns:tpnsplugin:1.8.0"
  34. }
  35. }
  36. subprojects {
  37. repositories {
  38. mavenLocal()
  39. maven {
  40. url "file://${rootProject.file("app/libs")}"
  41. }
  42. maven {
  43. url "http://mirrors.tencent.com/nexus/repository/maven-public/"
  44. }
  45. maven { url 'https://repo1.maven.org/maven2/' }
  46. mavenCentral()
  47. google()
  48. if (rootProject.file('localAar').exists()) {
  49. maven {
  50. url "file://${rootProject.file('localAar')}"
  51. }
  52. }
  53. }
  54. }