How to list the configured repositories?

前端 未结 3 1238
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-01 13:33

How can I list all the repositories configured for a project?

Background: I have a pretty complex gradle build script and cannot get my NetBeans to download the sour

3条回答
  •  爱一瞬间的悲伤
    2021-01-01 14:08

    For anyone interested, here is the code to list the loaded repositories (thanks @kelemen):

    task listrepos {
        doLast {
            println "Repositories:"
            project.repositories.each { println "Name: " + it.name + "; url: " + it.url }
       }
    }
    

    After adding this code to the build script, execute gradle listrepos and voilà...

提交回复
热议问题