let's pretend have github repository @ github.com/myprojects/myrepo
let's pretend have project in intellij build.gradle file contains following:
dependencies { // android compile 'com.android.support:appcompat-v7:21.0.0' // google play services compile 'com.google.android.gms:play-services:6.1.71' } i want add github project via gradle imagine dependencies need add like:
compile 'github.com:myprojects:myrepo' this isn't how works though since "failed resolve com.github:myprojects:myrepo
actual examples work:
compile 'com.github.satyan:sugar:1.3' compile 'com.github.castorflex.smoothprogressbar:library:x.x.x' since don't want clone repository libs folder, how can add compile command in dependencies portion of build.gradle file compile github can add following:
compile 'com.github.myprojects:myrepo'
compile 'com.github.castorflex.smoothprogressbar:library:x.x.x'
it works because library published in central maven.
compile 'github.com:myprojects:myrepo'
this isn't how works though since "failed resolve >com.github:myprojects:myrepo
it not enough push on github. have publish artifact on central maven or jcenter or local maven. can find guides publish on jcenter, example this.
Comments
Post a Comment