allprojects{

  repositories {

    mavenLocal()

    def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public/'

      all { ArtifactRepository repo ->

        if(repo instanceof MavenArtifactRepository){

          def url = repo.url.toString()

          if (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com/')) {

            project.logger.lifecycle "Repository ${repo.url} replaced by $REPOSITORY_URL."

            remove repo

          }

       }

    }

    maven {

      url REPOSITORY_URL

    }

  }

}

 

相关文章:

  • 2021-09-27
  • 2022-01-04
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2021-12-08
猜你喜欢
  • 2022-12-23
  • 2021-06-11
  • 2021-09-27
  • 2021-09-27
  • 2021-07-20
  • 2021-08-29
  • 2021-09-27
相关资源
相似解决方案