Files
HokmPlay/android/gradle-mirror.init.gradle.example
T

43 lines
1.2 KiB
Plaintext
Raw Normal View History

// Route Gradle (Android Gradle Plugin + deps) through a Maven mirror — for
// networks where dl.google.com / repo.maven.apache.org are blocked (Iran).
//
// 1) copy this file to: android/gradle-mirror.init.gradle
// 2) set MIRROR (and GOOGLE if your Nexus exposes Google's repo separately)
// 3) build: gradlew.bat assembleDebug --init-script gradle-mirror.init.gradle
// A Nexus "maven group" that proxies Maven Central AND Google's android repo:
def MIRROR = "https://mirror.soroushasadi.com/repository/maven-public/"
// If Google's repo is a separate proxy, set it here (else leave = MIRROR):
def GOOGLE = MIRROR
settingsEvaluated { settings ->
settings.pluginManagement {
repositories {
maven { url GOOGLE }
maven { url MIRROR }
}
}
try {
settings.dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
maven { url GOOGLE }
maven { url MIRROR }
}
}
} catch (ignored) { }
}
allprojects {
buildscript {
repositories {
maven { url GOOGLE }
maven { url MIRROR }
}
}
repositories {
maven { url GOOGLE }
maven { url MIRROR }
}
}