Add Abrha as a Maven Central fallback mirror (Myket stays primary)

- 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>
This commit is contained in:
soroush.asadi
2026-06-04 15:26:57 +03:30
parent 84ccbea56a
commit e02d976dda
2 changed files with 13 additions and 16 deletions
+2
View File
@@ -4,6 +4,7 @@ buildscript {
repositories { repositories {
maven { url 'https://maven.myket.ir' } maven { url 'https://maven.myket.ir' }
maven { url 'https://mirror.abrha.net/repository/maven/' }
google() google()
mavenCentral() mavenCentral()
} }
@@ -21,6 +22,7 @@ apply from: "variables.gradle"
allprojects { allprojects {
repositories { repositories {
maven { url 'https://maven.myket.ir' } maven { url 'https://maven.myket.ir' }
maven { url 'https://mirror.abrha.net/repository/maven/' }
google() google()
mavenCentral() mavenCentral()
} }
+11 -16
View File
@@ -1,27 +1,22 @@
// Build APK behind Iran's network using the Myket maven mirror. // Build APK behind Iran's network. Myket serves Maven Central + Google/AGP at
// // its root; Abrha is a Maven Central fallback.
// copy to: android/gradle-mirror.init.gradle (git-ignored) def MIRRORS = [
// build: java -classpath gradle\wrapper\gradle-wrapper.jar \ "https://maven.myket.ir", // Central + Google (AGP)
// org.gradle.wrapper.GradleWrapperMain assembleDebug \ "https://mirror.abrha.net/repository/maven/", // Central fallback
// --init-script gradle-mirror.init.gradle --no-daemon ]
//
// NOTE: the mirror serves the maven2 layout at the ROOT (no /maven2 suffix).
def MIRROR = "https://maven.myket.ir"
settingsEvaluated { settings -> settingsEvaluated { settings ->
settings.pluginManagement.repositories { maven { url MIRROR } } settings.pluginManagement.repositories { MIRRORS.each { m -> maven { url m } } }
try { try {
settings.dependencyResolutionManagement.repositories { maven { url MIRROR } } settings.dependencyResolutionManagement.repositories { MIRRORS.each { m -> maven { url m } } }
} catch (ignored) { } } catch (ignored) { }
} }
allprojects { allprojects {
buildscript { repositories { maven { url MIRROR } } } buildscript { repositories { MIRRORS.each { m -> maven { url m } } } }
repositories { maven { url MIRROR } } repositories { MIRRORS.each { m -> maven { url m } } }
// Environment workarounds (only needed when the exact SDK build-tools / JDK // Env workarounds: build-tools 35 / JDK 21 aren't present here.
// that Capacitor 8 expects aren't present — e.g. JDK 17 instead of 21, and
// build-tools 36 instead of 35). Remove on a CI with JDK 21 + build-tools 35.
afterEvaluate { p -> afterEvaluate { p ->
if (p.plugins.hasPlugin('com.android.application') || p.plugins.hasPlugin('com.android.library')) { if (p.plugins.hasPlugin('com.android.application') || p.plugins.hasPlugin('com.android.library')) {
p.android { p.android {