While working with Gradle in my country, download jars from maven central is a very timely-costed work.
I wanna change the mavenCentral to maven-nexus:
which means whenever I use mavenCentral it always points to oschina
------edit------
I have lots of projects with mavenCentral, so I do not want change each file.
Now in new scripts I use maven{ url ...} Any easy way??
Any one can hlep?
Thanks!
The easiest way to apply this change for all projects is to use an gradle init script that forces the use of the oschina repository instead of mavenCentral. you can put this:
into an gradle init file. Now you can use this by calling "gradle build -I yourInitFile.gradle" or you put this logic into a
init.gradle
file stored in your gradle home directory inUSER_HOME/.gradle/
directory. Now this will be picked up by every gradle invocation without explicitly setting-I
Another option is to create a custom gradle distribution where this file is store in the init.d directory of the distribution.