buildscript {
    apply from: "../config.gradle"

    repositories {
        mavenLocal()
        mavenCentral()
        google()
        jcenter()
        maven { url 'https://oss.sonatype.org/content/repositories/public/' }
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
    }
    dependencies {
        if (needKotlinV14()) {
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.ext.android["kotlin_version_v14"]}"
        } else {
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${rootProject.ext.android["kotlin_version_v13"]}"
        }
    }
}
//apply plugin: 'java-library'
apply plugin: 'kotlin'
apply plugin: 'kotlin-kapt'

/**
 * 由于 buildSrc 的执行时机要早于任何一个 project，因此需要⾃⼰添加仓库
 */
repositories {
    mavenLocal()
    mavenCentral()
    google()
    jcenter()
    maven { url 'https://oss.sonatype.org/content/repositories/public/' }
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

sourceSets {
    main {
        java {
            srcDirs += []
        }
        kotlin {
            srcDirs += ['src/main/kotlin', 'src/main/java']
        }
    }


}

compileKotlin {
    kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}


dependencies {
    compileOnly localGroovy()
    compileOnly gradleApi()

    implementation "com.android.tools.build:gradle:${rootProject.ext.android["agp_plugin_verson"]}"
    /* 👇👇👇👇 引用这两个模块 👇👇👇👇 */
    api "com.didiglobal.booster:booster-api:${rootProject.ext.android["booster_version"]}"
    api "com.didiglobal.booster:booster-transform-asm:${rootProject.ext.android["booster_version"]}"
}
