gradle default warehouse location of the configuration management project

Create a file init.gradle

allprojects {
    repositories {
         maven {
              name "aliyunRepo"
             url "http://maven.aliyun.com/nexus/content/groups/public/"
         }
    }
}

The files created into GRADLE_HOME / init.d / directory


test

Added build.gradle already created project

task showRepos << {
 println "All repos:"
 println repositories.collect { it.name }
}

Then use the command line

> gradle -q showRepos
All repos:
[aliyunRepo, MavenRepo]

If you want to output the result of this above, the configuration was successful

Guess you like

Origin blog.csdn.net/taoism_jerry/article/details/79035301