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
Implementations§
Source§impl Bundletool
impl Bundletool
Sourcepub fn build_apks(self, bundle: &Path, output: &Path) -> BuildApks
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
Sourcepub fn build_bundle(self, modules: &[PathBuf], output: &Path) -> BuildBundle
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
Sourcepub fn get_size_total(self, apks: &Path) -> GetSizeTotal
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
Sourcepub fn extract_apks(
self,
apks: &Path,
output_dir: &Path,
device_spec: &Path,
) -> ExtractApks
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
Sourcepub fn install_apks(self, apks: PathBuf) -> InstallApks
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
Sourcepub fn get_device_spec(self, output: &Path) -> GetDeviceSpec
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
impl Clone for Bundletool
Source§fn clone(&self) -> Bundletool
fn clone(&self) -> Bundletool
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Bundletool
Auto Trait Implementations§
impl Freeze for Bundletool
impl RefUnwindSafe for Bundletool
impl Send for Bundletool
impl Sync for Bundletool
impl Unpin for Bundletool
impl UnwindSafe for Bundletool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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