pub struct AndroidInputs {Show 19 fields
pub app_name: String,
pub version: String,
pub build_number: u32,
pub application_id: String,
pub min_sdk: u32,
pub target_sdk: u32,
pub rust_lib_name: String,
pub whisker_workspace_path: PathBuf,
pub whisker_user_package: String,
pub whisker_sdk_version: String,
pub whisker_gradle_plugin_version: String,
pub whisker_maven_url: String,
pub lynx_maven_url: String,
pub extra_permissions: Vec<String>,
pub extra_meta_data: Vec<MetaDataEntry>,
pub extra_gradle_plugins: Vec<String>,
pub extra_gradle_dependencies: Vec<String>,
pub extra_files: BTreeMap<PathBuf, FileEntry>,
pub template_version: u32,
}Expand description
Inputs the Android renderer pulls out of Config (+ a few
values the cli passes in like the dylib name and the workspace’s
platforms/android/whisker-runtime location).
Holding these in a struct rather than a big tuple keeps the fingerprint serialization stable and the template-vars build site easy to read.
Fields§
§app_name: String§version: String§build_number: u32§application_id: String§min_sdk: u32§target_sdk: u32§rust_lib_name: StringCrate name with hyphens replaced by underscores — what
System.loadLibrary and keepDebugSymbols reference.
whisker_workspace_path: PathBufPath the generated settings.gradle.kts writes into the
whisker { workspace = file(...) } block. The Settings
plugin resolves it relative to gen/android/, so callers
typically pass ../.. (or similar) — the path to the cargo
workspace root containing the user app’s Cargo.toml.
whisker_user_package: StringCargo crate name of the user app. Echoed into
whisker { userPackage = "..." }. The Settings plugin
walks the cargo dep graph rooted here for
[package.metadata.whisker]-tagged module deps.
whisker_sdk_version: Stringrs.whisker:whisker-runtime-android:<this> + sibling SDK
coords’ version. Step 4.5-e initial release is 0.1.0.
whisker_gradle_plugin_version: Stringrs.whisker:rs.whisker.gradle.plugin:<this> version pinned
in pluginManagement.plugins. Independent from
whisker_sdk_version — gradle-plugin and SDK release on
separate gradle-plugin-v* / sdk-v* tag streams.
whisker_maven_url: Stringgh-pages Maven URL hosting Whisker’s plugins + SDK. Templates
declare it in both pluginManagement.repositories and
dependencyResolutionManagement.repositories.
lynx_maven_url: Stringgh-pages Maven URL hosting the Lynx fork AARs that
whisker-runtime-android pulls transitively.
extra_permissions: Vec<String><uses-permission android:name="…"/> rows from the engine’s
post-pipeline IR. Emitted after the template’s hardcoded
INTERNET permission. Dedup’d: the same permission
contributed by multiple plugins shows up once.
extra_meta_data: Vec<MetaDataEntry><meta-data android:name="…" android:value="…"/> rows from
the engine’s post-pipeline IR. Emitted inside the
<application> block. Preserves insertion order — multiple
plugins contributing entries see deterministic output.
extra_gradle_plugins: Vec<String>Extra entries the renderer drops into the app module’s
plugins { … } block, just after the baseline Whisker /
AGP / Kotlin plugin ids. Bare ids (e.g.
"com.google.gms.google-services") get wrapped in
id("…"); raw id(...) lines pass through verbatim so
users can attach version "…" / apply false qualifiers.
extra_gradle_dependencies: Vec<String>Extra raw lines the renderer drops into the app module’s
dependencies { … } block. Each entry is emitted verbatim
(e.g.
"implementation(\"com.google.firebase:firebase-analytics:21.5.0\")").
extra_files: BTreeMap<PathBuf, FileEntry>Plugin-supplied additional files dropped into gen/android/.
Keys are relative paths (validated at write time); values
are FileEntrys — UTF-8 contents + optional POSIX mode.
Mode handling on Android is intentionally coarser than the
iOS renderer’s: the existing write_file helper takes a
bool executable flag, so the renderer projects
FileEntry::mode onto “executable yes/no” (any mode with
the user-execute bit set → 0o755, otherwise 0o644). Plugins
that need finer-grained Android permissions today would have
to ship a wrapper script that chmods at build time —
loosening this is a one-line write_file refactor when the
first consumer needs it.
template_version: u32Bumped whenever the template shape changes (added file,
renamed placeholder, …). The fingerprint mixes this in so
existing gen/ trees regenerate after an upgrade.
Trait Implementations§
Source§impl Clone for AndroidInputs
impl Clone for AndroidInputs
Source§fn clone(&self) -> AndroidInputs
fn clone(&self) -> AndroidInputs
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more