Skip to main content

AndroidInputs

Struct AndroidInputs 

Source
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: String

Crate name with hyphens replaced by underscores — what System.loadLibrary and keepDebugSymbols reference.

§whisker_workspace_path: PathBuf

Path 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: String

Cargo 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: String

rs.whisker:whisker-runtime-android:<this> + sibling SDK coords’ version. Step 4.5-e initial release is 0.1.0.

§whisker_gradle_plugin_version: String

rs.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: String

gh-pages Maven URL hosting Whisker’s plugins + SDK. Templates declare it in both pluginManagement.repositories and dependencyResolutionManagement.repositories.

§lynx_maven_url: String

gh-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: u32

Bumped 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

Source§

fn clone(&self) -> AndroidInputs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AndroidInputs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for AndroidInputs

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.