Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle: add dependency to github project to dev branch instead of master

I am trying to get "dev" branch instead of "master" branch from PhotoView project in Github: https://github.com/chrisbanes/PhotoView/tree/dev

But by default the dependencies get "master" branch.

dependencies {
    compile 'com.github.chrisbanes.photoview:library:1.2.3'
}

How should I change this dependency to get "dev" branch instead of "master"?

like image 686
Fran b Avatar asked May 19 '14 22:05

Fran b


2 Answers

Use this :

compile 'com.github.chrisbanes.photoview:library:dev-SNAPSHOT'

source https://github.com/jitpack/jitpack.io

like image 58
stephen1706 Avatar answered Nov 12 '22 19:11

stephen1706


It can be a general consideration.

compile 'com.github.chrisbanes.photoview:library:1.2.3'

It downloads the aar from Central Maven, not from github.

If you would like to work with the dev branch and gradle, you should ask the author for a snapshot release, or you have to build it locally.

BTW, about this lib, the version 1.2.3 is very recent. Why do you want to work with the dev branch?

like image 35
Gabriele Mariotti Avatar answered Nov 12 '22 18:11

Gabriele Mariotti