// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { maven{ url 'https://maven.aliyun.com/repository/google'} //修改 maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'} //修改 maven{ url 'https://maven.aliyun.com/repository/public'} //修改 maven{ url 'https://maven.aliyun.com/repository/jcenter'} //修改 maven { url "https://jitpack.io" } jcenter() google() mavenCentral() gradlePluginPortal() } apply from: 'config/config.gradle' ext { env.kotlin_version = '1.5.10' } dependencies { classpath "com.android.tools.build:gradle:4.1.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${env.kotlin_version}" // NOTE: Do not place your application dependencies here; they belong } } allprojects { repositories { maven{ url 'https://maven.aliyun.com/repository/google'} //修改 maven{ url 'https://maven.aliyun.com/repository/gradle-plugin'} //修改 maven{ url 'https://maven.aliyun.com/repository/public'} //修改 maven{ url 'https://maven.aliyun.com/repository/jcenter'} //修改 maven { url "https://jitpack.io" } jcenter() google() mavenCentral() } apply plugin: 'idea' buildDir = new File(rootDir, "gradle-build/${path.replaceAll(':', '/')}") } task clean(type: Delete) { delete rootProject.buildDir }