2026-06-04 15:26:57 +03:30
|
|
|
// 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
|
|
|
|
|
]
|
2026-06-04 14:31:14 +03:30
|
|
|
|
|
|
|
|
settingsEvaluated { settings ->
|
2026-06-04 15:26:57 +03:30
|
|
|
settings.pluginManagement.repositories { MIRRORS.each { m -> maven { url m } } }
|
2026-06-04 14:31:14 +03:30
|
|
|
try {
|
2026-06-04 15:26:57 +03:30
|
|
|
settings.dependencyResolutionManagement.repositories { MIRRORS.each { m -> maven { url m } } }
|
2026-06-04 14:31:14 +03:30
|
|
|
} catch (ignored) { }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
allprojects {
|
2026-06-04 15:26:57 +03:30
|
|
|
buildscript { repositories { MIRRORS.each { m -> maven { url m } } } }
|
|
|
|
|
repositories { MIRRORS.each { m -> maven { url m } } }
|
2026-06-04 15:22:34 +03:30
|
|
|
|
2026-06-04 15:26:57 +03:30
|
|
|
// Env workarounds: build-tools 35 / JDK 21 aren't present here.
|
2026-06-04 15:22:34 +03:30
|
|
|
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'
|
2026-06-04 14:31:14 +03:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|