Bonjour, I'm trying out `apollo-kotliin` for the f...
# apollo-kotlin
j
Bonjour, I'm trying out
apollo-kotliin
for the first time Following the tutorial works fine. until this step, any idea what I'm doing that's stupid? https://github.com/jmfayard/my-kotlin-scipts/commit/424c8222458f9bf320e76eab84479e0a1397e7e9 (edited)
1
m
Works for me, I get a file generated in
Copy code
build/generated/source/apollo/service/github/graphql/RateLimitQuery.kt
j
ahhh I didn't realize this was inside
build/generated
thanks 🙂
m
Sure thing!
Ultimately would be nice to have a plugin that generates them on the fly, like SQLDelight does
(but that won't change the fact that it's in
build/generated
. I think we want to keep this so that it's clearly outside version control)
j
I think it's fine, maybe just add:
println("apollo: updating Kotlin code in build/generated/source/apollo/service")
y
@mbonnin I'm curious if it's possible to hook into one of the tasks in idea Gradle plugin to make the task run on the fly?
m
@Yang we've been wanting to do that for a while now. There's a lot we can do in terms of IDE integration. On the fly codegen sounds like a good first feature
We'll have to see how it performs. We certainly don't want to rerun codegen on every keystroke 😅
y
I sort of want something similar to how the R classes are generated in AS, do you know if they have some help from Studio or is it something that can be achieved with Gradle alone?
m
I haven't looked at the R classes specifically but I believe there has to be some integration with AS/IntelliJ as Gradle isn't running when you're typing code
SQLDelight has some live codegen we could take inspiration from