Connecting source sets
By default, Apollo Kotlin adds generated sources:
to the
main
sourceSet for JVM projectsto
commonMain
for 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}