Michael Osofsky
Michael Osofsky

Reputation: 13135

How to declare a git repository as gradle dependency if the repository is missing any tag?

I'm trying to add a dependency on https://github.com/DaleKocian/VolleyAndRxJava from my project, but I'm getting an error:

Error:(130, 13) Failed to resolve: com.github.DaleKocian:VolleyAndRxJava:+
<a href="openFile:/Users/michaelosofsky/Developer/android-sdk-1.2/locuslabs-android-sdk/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>

I believe the problem is that I haven't specified the right tag, which, as specified, is required in Is it possible to declare git repository as dependency in android gradle?.

I don't know what to use a tag, because https://github.com/DaleKocian/VolleyAndRxJava doesn't seem to have any tag.

According to Gradle dependency version syntax, the syntax is specified with Ivy, but I can't tell from the Ivy documentation how I should specify there is no tag.

Here is an excerpt from my build.gradle file:

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.github.DaleKocian:VolleyAndRxJava:+'
}

Here are other values I tried for the Tag:

'com.github.DaleKocian:VolleyAndRxJava:+'
'com.github.DaleKocian:VolleyAndRxJava:'
'com.github.DaleKocian:VolleyAndRxJava'
'com.github.DaleKocian:VolleyAndRxJava:latest'
'com.github.DaleKocian:VolleyAndRxJava:latest.integration'
'com.github.DaleKocian:VolleyAndRxJava:latest.release'
'compile 'com.github.DaleKocian:VolleyAndRxJava:latest.[any status]'

None of those worked though so how should I add https://github.com/DaleKocian/VolleyAndRxJava as a dependency in my build.gradle file?

Upvotes: 1

Views: 1304

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191743

Examples of using rx java with volley

That's all that repository is. Examples.

It's not a library like Volley or RxJava themselves.

You can clone that library separately from your project, and install it, run some examples, then copy the necessary sections of code to your own app.


If you did have a library that wasn't published to BinTray, then JitPack could allow you compile Github projects using tags or commit references

For reference: https://jitpack.io/#DaleKocian/VolleyAndRxJava

But, as stated, it's not a library

Upvotes: 2

Related Questions