Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Docs
Start for Free

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
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company