Docs
Launch GraphOS Studio
You're viewing documentation for an upcoming version of this software. Switch to the latest stable version.

Connecting source sets


By default, 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 , you can do so with:

apollo {
service("service") {
outputDirConnection {
connectToAndroidSourceSet("demoDebug")
}
}
}
Previous
Multi Modules
Next
Gradle plugin configuration
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company