// 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" settingsEvaluated { settings -> settings.pluginManagement.repositories { maven { url MIRROR } } try { settings.dependencyResolutionManagement.repositories { maven { url MIRROR } } } catch (ignored) { } } allprojects { buildscript { repositories { maven { url MIRROR } } } repositories { maven { url MIRROR } } // 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. 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' } } }