e02d976dda
- Myket (root) proxies Central + Google/AGP; Abrha (mirror.abrha.net/repository/maven/) is Central-only → used as fallback - build.gradle + gradle-mirror.init template list both; APK rebuilds clean Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
// 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'
|
|
}
|
|
}
|
|
}
|