Bundletool

Struct Bundletool 

Source
pub struct Bundletool;
Expand description

§Bundletool

bundletool is the underlying tool that Android Studio, the Android Gradle plugin, and Google Play use to build an Android App Bundle, and convert an app bundle into the various APKs that are deployed to devices. Bundletool is also available to you as a command line tool, so you can build app bundles yourself and recreate Google Play’s server-side build of your app’s APKs.

§Download bundletool

If you haven’t already done so, download bundletool from the [GitHub repository].

§Install bundletool

In variable environments needs to create new variable BUNDLETOOL_PATH and add path to the bundletool

GitHub repository

Implementations§

Source§

impl Bundletool

Source

pub fn build_apks(self, bundle: &Path, output: &Path) -> BuildApks

Generate an APK set for all device configurations your app supports from your app bundle

Source

pub fn build_bundle(self, modules: &[PathBuf], output: &Path) -> BuildBundle

Generate AAB file from generated zip modules to specified path. Notice, that zip module must contents files in protobuf format

Source

pub fn get_size_total(self, apks: &Path) -> GetSizeTotal

To measure the estimated download sizes of APKs in an APK set as they would be served compressed over-the-wire, use the get-size total

Source

pub fn extract_apks( self, apks: &Path, output_dir: &Path, device_spec: &Path, ) -> ExtractApks

Extract device-specific APKs from an existing APK set If you have an existing APK set and you want to extract from it a subset of APKs that target a specific device configuration, you can use the extract-apks command and specify a device specification JSON

Source

pub fn install_apks(self, apks: PathBuf) -> InstallApks

Use the install-apks command and specify the path of the APK set to deploy your app from an APK set

Source

pub fn get_device_spec(self, output: &Path) -> GetDeviceSpec

Generate and use device specification JSON files. Bundletool is capable of generating an APK set that targets a device configuration specified by a JSON file. To first generate a JSON file for a connected device, run the command

Trait Implementations§

Source§

impl Clone for Bundletool

Source§

fn clone(&self) -> Bundletool

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Bundletool

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.