From e02d976dda0a0d443cbd7bd52c9de6b6548d2d99 Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Thu, 4 Jun 2026 15:26:57 +0330 Subject: [PATCH] Add Abrha as a Maven Central fallback mirror (Myket stays primary) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- android/build.gradle | 2 ++ android/gradle-mirror.init.gradle.example | 27 +++++++++-------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 7dbde02..9c19427 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,6 +4,7 @@ buildscript { repositories { maven { url 'https://maven.myket.ir' } + maven { url 'https://mirror.abrha.net/repository/maven/' } google() mavenCentral() } @@ -21,6 +22,7 @@ apply from: "variables.gradle" allprojects { repositories { maven { url 'https://maven.myket.ir' } + maven { url 'https://mirror.abrha.net/repository/maven/' } google() mavenCentral() } diff --git a/android/gradle-mirror.init.gradle.example b/android/gradle-mirror.init.gradle.example index 9df873d..22b7594 100644 --- a/android/gradle-mirror.init.gradle.example +++ b/android/gradle-mirror.init.gradle.example @@ -1,27 +1,22 @@ -// Build APK behind Iran's network using the Myket maven mirror. -// -// copy to: android/gradle-mirror.init.gradle (git-ignored) -// build: java -classpath gradle\wrapper\gradle-wrapper.jar \ -// org.gradle.wrapper.GradleWrapperMain assembleDebug \ -// --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" +// 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 { maven { url MIRROR } } + settings.pluginManagement.repositories { MIRRORS.each { m -> maven { url m } } } try { - settings.dependencyResolutionManagement.repositories { maven { url MIRROR } } + settings.dependencyResolutionManagement.repositories { MIRRORS.each { m -> maven { url m } } } } catch (ignored) { } } allprojects { - buildscript { repositories { maven { url MIRROR } } } - repositories { maven { url MIRROR } } + buildscript { repositories { MIRRORS.each { m -> maven { url m } } } } + repositories { MIRRORS.each { m -> maven { url m } } } - // Environment workarounds (only needed when the exact SDK build-tools / JDK - // 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. + // 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 {