buildscript { def miniAppConfigFilePath = "$rootDir/miniapp.json" def jsonFile = new File(miniAppConfigFilePath) def miniAppConfig = new groovy.json.JsonSlurper().parseText(jsonFile.text) ext.miniAppConfig = miniAppConfig def miniAppPluginConfigFilePath = "$rootDir/miniapp.plugin.json" def pluginJsonFile = new File(miniAppPluginConfigFilePath) def miniAppPluginConfig = new groovy.json.JsonSlurper().parseText(pluginJsonFile.text) ext.miniAppPluginConfig = miniAppPluginConfig ext.saaaSDKVersionDepend = miniAppPluginConfig.debugSaaAVersion // 依赖的主模块版本 ext.versionName = miniAppPluginConfig.pluginVersion // 构建的插件版本 ext { buildToolsVersion = "29.0.2" minSdkVersion = 21 compileSdkVersion = 29 targetSdkVersion = 28 javaVersion = JavaVersion.VERSION_1_8 kotlin_version = '1.3.72' } allprojects { repositories { google() jcenter() // 增加mavenCentral中央仓库 mavenCentral() } } repositories { jcenter() mavenLocal() maven { url "http://mirrors.tencent.com/nexus/repository/maven-public/" } mavenCentral() google() } dependencies { classpath "com.android.tools.build:gradle:4.1.3" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'de.undercouch:gradle-download-task:5.3.0' classpath "com.tencent.android.tpns:tpnsplugin:1.8.0" classpath 'com.github.kezong:fat-aar:1.3.8' } } subprojects { repositories { mavenLocal() maven { url "file://${rootProject.file("app/libs")}" } maven { url "http://mirrors.tencent.com/nexus/repository/maven-public/" } mavenCentral() google() } }