gradle 安装配置

1,下载gradleweb

http://services.gradle.org/distributions/maven

idea 可使用工具编写一个groovy的helloworldide

2,设置gradle下载jar的位置:GRADLE_USER_HOME工具

3,配置init.gradlegradle

路径(没有则不用设置)url

C:\Users\Administrator\.gradleidea

内容code

allprojects{
  repositories {
    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
    }
  }
}

4,设置下载仓库地址blog

init.gradle 的设置以下rem

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

配置gradle的web-inf目录

相关文章
相关标签/搜索