// Top-level build file where you can add configuration options common to all sub-projects/modules. apply from: this.file('common.gradle') buildscript { ext { agp_version = '8.7.3' kotlin_version = '1.9.22' } repositories { maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'https://maven.aliyun.com/repository/public' }//jcenter maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }//gradle-plugin maven { url 'https://maven.aliyun.com/repository/central' }//central maven { url 'https://maven.aliyun.com/repository/google' }//google google() jcenter() mavenCentral() maven { url "https://jitpack.io" } maven { url "https://www.jitpack.io" } maven { url "https://plugins.gradle.org/m2/" } // cc-register 可能需要的仓库 maven { url 'https://repo1.maven.org/maven2/' } } dependencies { classpath "com.android.tools.build:gradle:$agp_version" classpath "io.realm:realm-gradle-plugin:3.0.0"//添加realm插件 classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.billy.android:cc-register:1.1.2' classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.6" // Kotlin 标准库(DataBinding 编译器在 AGP 8.x 中需要) classpath 'org.jetbrains.kotlin:kotlin-stdlib:1.9.22' } } allprojects { repositories { maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'https://maven.aliyun.com/repository/public' }//jcenter maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }//gradle-plugin maven { url 'https://maven.aliyun.com/repository/central' }//central maven { url 'https://maven.aliyun.com/repository/google' }//google flatDir { dirs 'libs' } google() jcenter() maven { url "https://jitpack.io"} maven { url "https://www.jitpack.io" } // maven { url 'https://dl.bintray.com/aweme-open-sdk-team/public' } } // 统一配置所有 Kotlin 编译任务的 JVM 目标版本 tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { kotlinOptions { jvmTarget = '1.8' } } } task clean(type: Delete) { delete rootProject.buildDir }