// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {

    repositories {
        google()
        mavenCentral()
        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()
        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 {
        google()
        mavenCentral()
        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()
    }
    apply plugin: 'idea'
    buildDir = new File(rootDir, "gradle-build/${path.replaceAll(':', '/')}")
}

task clean(type: Delete) {
    delete rootProject.buildDir
}