Skip to content

Instantly share code, notes, and snippets.

View cosmicethics's full-sized avatar

cyh cosmicethics

View GitHub Profile
@bennyhuo
bennyhuo / init.gradle.kts
Last active September 14, 2025 10:18
How to config mirrors for repositories in Gradle without changing the source code of your project?
fun RepositoryHandler.enableMirror() {
all {
if (this is MavenArtifactRepository) {
val originalUrl = this.url.toString().removeSuffix("/")
urlMappings[originalUrl]?.let {
logger.lifecycle("Repository[$url] is mirrored to $it")
this.setUrl(it)
}
}
}
// Place your key bindings in this file to override the defaults
[
{
"key": "space",
"command": "dance.openMenu",
"args": {
"input": "leader"
},
"when": "!inputFocus || editorTextFocus && dance.mode == 'normal'"
},