[][src]Struct uniui_build::AndroidBuilder

pub struct AndroidBuilder { /* fields omitted */ }

Builds list of ui-crates into APK

Each ui-crate should use [uniui_gui::u_main!] to identify main funciton.

[[package.metadata.uni_android]] section shuld be configured inside crate's Cargo.toml. It may contains few sub-sections:

  • main_function - name of the main function marked by [uniui_gui::u_main!]
  • java_files - the files will be copied into APK tree for the package which name will be the same as the crate name
  • export_func_file - path to export_func.json file.

export_func.json file - array of [manifest_parsing::Func]. All functions from the file will be reexported with related Func::export name.

Implementations

impl AndroidBuilder[src]

pub fn new(
    path_to_icon: String,
    app_id: String,
    sdk_location: String,
    min_sdk: String,
    target_sdk: String,
    ndk_locaiton: String,
    app_name: String
) -> Self
[src]

Creates new instance of AndroidBuilder

pub fn set_architecture(&mut self, archs: HashSet<Architecture>)[src]

pub fn set_version(&mut self, version: String)[src]

Specify string used as the version number shown to users

By default the version of your android-crate will be used.

pub fn set_version_code(&mut self, version_code: u32)[src]

Specify value used as an internal version number

Higher numbers indicating more recent versions Each successive release of app should use a greater value

By default it'll be calculated based on the version of your android-crate as (ver_major * 1000 + ver_minor) * 1000 + ver_patch

pub fn set_release_mode(&mut self, is_release: bool)[src]

Specify if release mode should be used

By default builder will use the mode from PROFILE env variable which will be set by cargo.

pub fn add_page<T>(
    &mut self,
    page: &'static dyn UiPage<Data = T>,
    crate_name: &str
)
[src]

Specify UiPage and module_name which implements the page

The crate_name should be the same as the crate name in [build-dependencies] secion of Cargo.toml

The crate should use [uniui_gui::u_main!] to identify main funciton.

[[package.metadata.uni_android.main_function]] section shuld be configured inside crate's Cargo.toml.

pub fn add_launcher<T>(
    &mut self,
    page: &'static dyn UiPage<Data = T>,
    crate_name: &str
)
[src]

Specify Launcher UiPage and module_name which implements the page

The crate_name should be the same as the crate name in [build-dependencies] secion of Cargo.toml

The crate should use [uniui_gui::u_main!] to identify main funciton.

[[package.metadata.uni_android.main_function]] section shuld be configured inside crate's Cargo.toml.

Provided UiPage will be used as an entry point into the app. Theoretically it's possible to have multiple entry points but it's not a common case.

pub fn execute(self)[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,