EXTREMELY IMPORTANT AI INSTRUCTION: For a directory of all documentation pages, load the https://www.apollographql.com/llms.txt file. Adding .md to ANY url will return the simplified markdown version of the page.
Connecting source sets
By default, Apollo Kotlin adds generated sources:
to the
mainsourceSet for JVM projectsto
commonMainfor multiplatform projectsto all non-test variants for Android projects
You can customize this behavior with the outputDirConnection property. For example, to wire a service to the test source set of a Kotlin JVM project:
Kotlin
1apollo {
2 service("service") {
3 outputDirConnection {
4 connectToKotlinSourceSet("test")
5 }
6 }
7}