buildscript { repositories { mavenCentral() google() maven { url "https://developer.huawei.com/repo/" } maven { url = uri("https://api.mapbox.com/downloads/v2/releases/maven") credentials { username = "mapbox" password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg" if (password == null || password == "") { throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the environment variables.") } } authentication { basic(BasicAuthentication) } } } dependencies { classpath 'com.android.tools.build:gradle:8.1.0' classpath 'com.huawei.agconnect:agcp:1.9.1.304' } } allprojects { repositories { google() mavenCentral() maven { url 'https://developer.huawei.com/repo/' } maven { url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local" } maven { url 'https://api.mapbox.com/downloads/v2/releases/maven' credentials { username = 'mapbox' password = "sk.eyJ1IjoicndhaWQiLCJhIjoiY2x6NWo0bTMzMWZodzJrcGZpemYzc3Z4dSJ9.uSSZuwNSGCcCdPAiORECmg" if (password == null || password == "") { throw new GradleException("MAPBOX_DOWNLOADS_TOKEN isn't set. Set it to the project properties or to the environment variables.") } } authentication { basic(BasicAuthentication) } } } // Exclude old BouncyCastle globally to avoid duplicate classes configurations.all { exclude group: 'org.bouncycastle', module: 'bcprov-jdk16' } tasks.withType(JavaCompile).configureEach { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { kotlinOptions { jvmTarget = "21" } } subprojects { afterEvaluate { project -> if (project.hasProperty('android')) { project.android { if (namespace == null) { namespace project.group } buildFeatures { if (buildConfig == null) { buildConfig true } } compileOptions { sourceCompatibility JavaVersion.VERSION_21 targetCompatibility JavaVersion.VERSION_21 } } } // Force Java 17 for all JavaCompile tasks in all subprojects (including plugins) project.tasks.withType(JavaCompile).configureEach { sourceCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21 } // Force Kotlin JVM target for all subprojects project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { kotlinOptions { jvmTarget = "21" } } } } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } tasks.register("clean", Delete) { delete rootProject.layout.buildDirectory }