// buildscript {
//     ext.kotlin_version = '1.8.21'

//     ext {
//         compileSdkVersion   = 34
//         targetSdkVersion    = 34
//         appCompatVersion    = "1.1.0"
//     }

//     repositories {
//         google()
//         jcenter()
//     }

//     dependencies {
//         classpath 'com.android.tools.build:gradle:7.1.1'
//         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
//     }
// }

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            // [required] background_fetch
            url "${project(':background_fetch').projectDir}/libs"
        }
    }
}

subprojects {
    afterEvaluate {project ->
        if (project.plugins.hasPlugin('android') || project.plugins.hasPlugin('android-library')) {
            android {
                compileSdkVersion 34
                buildToolsVersion '31.0.0'
            }
        }
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

tasks.register("clean", Delete) {
    delete rootProject.buildDir
}