Koin: Gradle won't sync when project contains jitpack repository

Created on 13 Sep 2019  Â·  3Comments  Â·  Source: InsertKoinIO/koin

Gradle sync will fail when maven jitpack repository is included in project.

E.G.
repositories {
jcenter()
}
With the above gradlew sync succeeds

repositories {
maven { url "https://jitpack.io" }
jcenter()
}
With the above gradlew sync fails with error: Could not HEAD 'https://jitpack.io/org/koin/koin-android/2.0.1/koin-android-2.0.1.pom'. Received status code 522 from server: Origin Connection Time-out

koin_version = '2.0.1'

Most helpful comment

What if you put jcenter first? (Which you should always prefer.) Also, it
depends on how you define your dependencies.

On Fri, 13 Sep 2019, 17:30 Guy McLean, notifications@github.com wrote:

Gradle sync will fail when maven jitpack repository is included in project.

E.G.
repositories {
jcenter()
}
With the above gradlew sync succeeds

repositories {
maven { url "https://jitpack.io" }
jcenter()
}
With the above gradlew sync fails with error: Could not HEAD
'https://jitpack.io/org/koin/koin-android/2.0.1/koin-android-2.0.1.pom
https://jitpack.io/org/koin/koin-android/2.0.1/koin-android-2.0.1.pom'.
Received status code 522 from server: Origin Connection Time-out

koin_version = '2.0.1'

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/InsertKoinIO/koin/issues/581?email_source=notifications&email_token=AABP6ZOHG3J5UTXDKVM6Z4LQJOWZPA5CNFSM4IWRJX62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLIQPGQ,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABP6ZNUTS727MFPCHJWLU3QJOWZPANCNFSM4IWRJX6Q
.

All 3 comments

What if you put jcenter first? (Which you should always prefer.) Also, it
depends on how you define your dependencies.

On Fri, 13 Sep 2019, 17:30 Guy McLean, notifications@github.com wrote:

Gradle sync will fail when maven jitpack repository is included in project.

E.G.
repositories {
jcenter()
}
With the above gradlew sync succeeds

repositories {
maven { url "https://jitpack.io" }
jcenter()
}
With the above gradlew sync fails with error: Could not HEAD
'https://jitpack.io/org/koin/koin-android/2.0.1/koin-android-2.0.1.pom
https://jitpack.io/org/koin/koin-android/2.0.1/koin-android-2.0.1.pom'.
Received status code 522 from server: Origin Connection Time-out

koin_version = '2.0.1'

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/InsertKoinIO/koin/issues/581?email_source=notifications&email_token=AABP6ZOHG3J5UTXDKVM6Z4LQJOWZPA5CNFSM4IWRJX62YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLIQPGQ,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABP6ZNUTS727MFPCHJWLU3QJOWZPANCNFSM4IWRJX6Q
.

Looks similar to this issue in Jitpack: https://github.com/jitpack/jitpack.io/issues/3973

Fixed by putting jcenter dependency above jitpack, thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dakuenjery picture dakuenjery  Â·  4Comments

miladsalimiiii picture miladsalimiiii  Â·  3Comments

sankarsana picture sankarsana  Â·  4Comments

CristianMG picture CristianMG  Â·  3Comments

mubarak1361 picture mubarak1361  Â·  3Comments