// Build APK behind Iran's network. Myket serves Maven Central + Google/AGP at // its root; Abrha is a Maven Central fallback. def MIRRORS = [ "https://maven.myket.ir", // Central + Google (AGP) "https://mirror.abrha.net/repository/maven/", // Central fallback ] settingsEvaluated { settings -> settings.pluginManagement.repositories { MIRRORS.each { m -> maven { url m } } } try { settings.dependencyResolutionManagement.repositories { MIRRORS.each { m -> maven { url m } } } } catch (ignored) { } } allprojects { buildscript { repositories { MIRRORS.each { m -> maven { url m } } } } repositories { MIRRORS.each { m -> maven { url m } } } // Env workarounds: build-tools 35 / JDK 21 aren't present here. afterEvaluate { p -> if (p.plugins.hasPlugin('com.android.application') || p.plugins.hasPlugin('com.android.library')) { p.android { buildToolsVersion '36.0.0' compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } } } p.tasks.withType(JavaCompile).configureEach { sourceCompatibility = '17' targetCompatibility = '17' } } }