first time working with apollo kotlin. trying to a...
# apollo-kotlin
c
first time working with apollo kotlin. trying to add apollo-kotlin to a new module i created. when i sync i get this error. Am I missing something fundamental here? Edit: fairly certain something is either wrong with apollo-kotlin or maven central?
e
Copy code
repositories {
    mavenCentral()
}
?
hmm, although I'm not sure how you'd get
apollo-runtime
without central
c
yeah my root build.gradle.kts has this
whats interesting is the error message says
:apollo-lib:test:
but the name of my module is apollo-lib
and theres no test directory or anything
actually. its two error messages. the second one is identical except its
:apollo-lib:main:
seems like it happens in a brand new project as well. hm. anyone think that maybe mavenCentral is down or something?
e
hmm. 3.9.3 doesn't seem to exist on central, plenty of earlier and later versions though
c
Weird. I tried
Copy code
configurations.all {
  resolutionStrategy {
    force("com.squareup.okhttp3:okhttp:4.10.0")
  }
}
and that didn't work either
does look like 4.9.3 is on mavencentral for okhttp https://search.maven.org/artifact/com.squareup.okhttp3/okhttp/4.9.3/jar
e
oh I see it listed on https://search.maven.org/artifact/com.squareup.okhttp3/okhttp, it wasn't showing up for me earlier. strange.
c
any ideas on what i can do to debug? this is killin me. tried it in two projects + a greenfield project. still no dice.
can't be just me... can it?
b
👀 Odd! Let me see if I can repro.
nope, can't repro (on this most basic project)
gradle didn't let me use
sourceCompatibility = JavaVersion.VERSION_1_7
though, I wonder if it could be related
maybe more logs could enlighten us 🙂 (
./gradlew -i --stacktrace assemble
)
c
Updated from 1_7 to 11 and everything seems to work now?
🤯
im not even on latest agp alpha or anything that forces java 11. but i guess that was the culprit
b
Thanks for reporting back!
c
Going back down to 1_7 repros the issue. 1_8 and 11 work.
¯\_(ツ)_/¯
thank you all. i was going to miss my deadlines because of this lol
b
Haha well thanks for reaching out!
e
1.7 was not a particularly useful target anyway: Kotlin skipped from generating 1.6 bytecode to 1.8, and there's pretty much no reason to have a lower target now
I guess Gradle was like "there's no okhttp artifacts available to this project because they require 1.8+, but I'm not gonna tell you that directly"
c
yeah. maybe worth calling out in the docs
¯\_(ツ)_/¯