MobDev.Plugin.AndroidBootstrap (mob_dev v0.6.32)

Copy Markdown View Source

Generates opt-in Android ui_components registrations for io.mob.plugin.MobPluginBootstrap.

ui_components.android.composable remains the native-view registry key used by existing plugins. A plugin opts into generated registration by declaring a separate ui_components.android.factory Kotlin function. Generated factories receive both the component props and native event sender.

A bare factory name is qualified with the package of android.bridge_class; a fully-qualified factory works without a bridge. Plugins that do not declare factory keep their existing bridge- or host-owned registration unchanged.

Summary

Functions

Classifies explicitly auto-registered Android components.

Returns the generated Kotlin registration call and object body, or nil.

Types

classified()

@type classified() :: %{
  registrations: [%{key: String.t(), factory: String.t(), plugin: atom()}],
  errors: [String.t()]
}

Functions

classify(plugins)

@spec classify([MobDev.Plugin.Merge.plugin()]) :: classified()

Classifies explicitly auto-registered Android components.

Components without android.factory contribute nothing. Output order is activation order followed by declaration order within each manifest.

ui_source(map, app_package)

@spec ui_source(classified(), String.t()) ::
  %{call: String.t(), body: String.t()} | nil

Returns the generated Kotlin registration call and object body, or nil.