enableTopLevelFunctionInjection

@DelicateMetroGradleApi(message = "Top-level function injection is experimental and does not work yet in all cases. See the kdoc.")
val enableTopLevelFunctionInjection: Property<Boolean>(source)

Enables whether the Metro compiler plugin can inject top-level functions. See the kdoc on Inject for more details.

Warnings

  • Prior to Kotlin 2.3.20, top-level function injection is only compatible with jvm/android targets.

  • Top-level function injection is not yet compatible with incremental compilation on any platform