apply from: "${rootProject.rootDir}/buildCommon/commonLibConfig.gradle"
buildscript {
    repositories {
//        google()
//        jcenter()
//        maven { url "https://jitpack.io" }

        google()
        mavenCentral()
        maven { url 'https://maven.aliyun.com/repository/public' } // 阿里云 Maven 镜像
        maven { url 'https://maven.aliyun.com/repository/google' } // 阿里云 Google 仓库镜像
        maven { url 'https://maven.aliyun.com/repository/central' } // 阿里云 Maven Central 镜像
        maven { url 'https://maven.aliyun.com/repository/jcenter' } // 阿里云 JCenter 镜像
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } // 阿里云 Gradle 插件镜像
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://maven.aliyun.com/repository/public' } // 阿里云 Maven 镜像
        maven { url 'https://maven.aliyun.com/repository/google' } // 阿里云 Google 仓库镜像
        maven { url 'https://maven.aliyun.com/repository/central' } // 阿里云 Maven Central 镜像
        maven { url 'https://maven.aliyun.com/repository/jcenter' } // 阿里云 JCenter 镜像
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } // 阿里云 Gradle 插件镜像

        maven { url "https://jitpack.io" }
        flatDir {
            dirs 'libs'
        }
    }
}

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

gradle.projectsEvaluated {
    tasks.withType(JavaCompile) {
        options.compilerArgs << "-Xmaxerrs" << "500" // or whatever number you want
    }
}