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"