Connecting source sets
By default, Apollo Kotlin adds the generated files to the main
(for JVM/Android projects) or commonMain
(for multiplatform projects) source sets.
If you only need them in a specific source set, you can use outputDirConnection
to add them to a different source set.
For an example, you can add them to the "test" source set:
apollo {service("service") {outputDirConnection {connectToKotlinSourceSet("test")}}}
On Android, because the generated files are added to the main
source set, they are available in all your build variants. If you need them available to only a specific build variant, you can do so with:
apollo {service("service") {outputDirConnection {connectToAndroidSourceSet("demoDebug")}}}