Created
August 2, 2017 15:36
-
-
Save act262/ea5dc41a070520c7fa0c5548f1ec5d1e to your computer and use it in GitHub Desktop.
Gradle初始化脚本配置仓库
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gradle = getGradle() | |
println "***************************************************" | |
println "Dump gradle information" | |
println "Version:${gradle.getGradleVersion()}" | |
println "UserHomeDir:${gradle.getGradleUserHomeDir()}" | |
println "HomeDir:${gradle.getGradleHomeDir()}" | |
println "***************************************************" | |
// Maven credentials | |
def NEXUS_SERVER = "http://nexus.xxx.com/content/groups/public" | |
def NEXUS_USERNAME = "developer" | |
def NEXUS_PASSWORD = "pwd" | |
// 阿里云 maven 服务器 | |
def MAVEN_ALIYUN = 'http://maven.aliyun.com/nexus/content/groups/public' | |
allprojects { | |
buildscript { | |
repositories { | |
maven { | |
credentials { | |
username NEXUS_USERNAME | |
password NEXUS_PASSWORD | |
} | |
url NEXUS_SERVER | |
} | |
maven { | |
url MAVEN_ALIYUN | |
} | |
jcenter() | |
} | |
} | |
repositories { | |
maven { | |
credentials { | |
username NEXUS_USERNAME | |
password NEXUS_PASSWORD | |
} | |
url NEXUS_SERVER | |
} | |
maven { | |
url MAVEN_ALIYUN | |
} | |
jcenter() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment