Created
July 29, 2020 05:56
-
-
Save MRsoymilk/638f9192c2e7cf73c3c47da527ddef82 to your computer and use it in GitHub Desktop.
gradle global repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def repoConfig = { | |
| all { ArtifactRepository repo -> | |
| if (repo instanceof MavenArtifactRepository) { | |
| def url = repo.url.toString() | |
| if (url.contains('repo1.maven.org/maven2') || url.contains('jcenter.bintray.com')) { | |
| println "gradle init: (${repo.name}: ${repo.url}) removed" | |
| remove repo | |
| } | |
| } | |
| } | |
| maven { url 'https://maven.aliyun.com/repository/central' } | |
| maven { url 'https://maven.aliyun.com/repository/jcenter' } | |
| maven { url 'https://maven.aliyun.com/repository/google' } | |
| maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } | |
| } | |
| allprojects { | |
| buildscript { | |
| repositories repoConfig | |
| } | |
| repositories repoConfig | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment