Skip to content

Instantly share code, notes, and snippets.

View Jacknic's full-sized avatar
😆
working

Jacknic Jacknic

😆
working
View GitHub Profile
@Jacknic
Jacknic / init.gradle.kts
Last active August 22, 2025 11:00 — forked from bennyhuo/init.gradle.kts
How to config mirrors for repositories in Gradle without changing the source code of your project?
@file:Suppress("UnstableApiUsage")
val urlMappingsTencent = mapOf(
"https://repo.maven.apache.org/maven2/" to "https://mirrors.tencent.com/nexus/repository/maven-public/",
"https://dl.google.com/dl/android/maven2/" to "https://mirrors.tencent.com/nexus/repository/maven-public/",
"https://plugins.gradle.org/m2" to "https://mirrors.tencent.com/nexus/repository/gradle-plugins/"
)
val urlMappingsHuawei = mapOf(