1. 上传代码到github
git init
git remote add origin git@github.com:Geroff/MavenTest.gitgit add.(ssh地址)
git commit -m "first commit"git push origin -u master
2. 复制主页面链接
将github.com修改为raw.githubusercontent.com
在主页面链接后新增/master
3. api 使用
ext{// ext is a gradle closure allowing the declaration of global properties
PUBLISH_GROUP_ID= 'lib.hz.com'
PUBLISH_ARTIFACT_ID= 'scoreProgress'
PUBLISH_VERSION= android.defaultConfig.versionName
}
api PUBLISH_GROUP_ID:PUBLISH_ARTIFACT_ID:版本号
api "lib.hz.com:scoreProgress:1.0"