Skip to content

Commit 8a78bd0

Browse files
StylianosGakisBoD
andauthored
Update multi-modules.mdx to add a note about it being a good idea to mark your schema module as a jvm-only module (#6277)
* Update multi-modules.mdx Add a note about it being a good idea to make your schema module a jvm-only module when building for Android * Update docs/source/advanced/multi-modules.mdx Co-authored-by: Benoit 'BoD' Lubek <[email protected]> * Update docs/source/advanced/multi-modules.mdx Co-authored-by: Benoit 'BoD' Lubek <[email protected]> --------- Co-authored-by: Benoit 'BoD' Lubek <[email protected]>
1 parent 6d5ec14 commit 8a78bd0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/source/advanced/multi-modules.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,8 @@ The `bidirectional` parameter is experimental and not compatible with <a href="h
118118

119119
</ExperimentalFeature>
120120

121+
## Optional optimizations
122+
123+
In Android projects, to further improve build times you can consider making your schema module a JVM module instead of an Android library. Since Apollo Kotlin is multiplatform, and Android is capable of depending on JVM-only modules, you can benefit from reducing the amount of work needed to compile the schema module. This is true because JVM modules build faster than Android libraries even with identical source code.
124+
This is often a good idea because Apollo often happens to be on the critical path of compiling your app. This happens when all the feature modules that use Apollo need to wait for all the type-safe code to be generated before they themselves can start building too.
125+

0 commit comments

Comments
 (0)