Search in sources :

Example 1 with ModuleType

use of com.android.tools.build.bundletool.model.BundleModule.ModuleType in project bundletool by google.

the class ModuleCompressionManager method shouldForceUncompressAssets.

/**
 * Returns whether all assets should be uncompressed in that module.
 */
boolean shouldForceUncompressAssets(BundleConfig bundleConfig, AndroidManifest moduleManifest) {
    boolean shouldForceInstallTimeAssetModulesUncompressed = !bundleConfig.getCompression().getInstallTimeAssetModuleDefaultCompression().equals(AssetModuleCompression.COMPRESSED);
    ModuleDeliveryType moduleDeliveryType = moduleManifest.getModuleDeliveryType();
    ModuleType moduleType = moduleManifest.getModuleType();
    boolean isInstallTimeModule = moduleDeliveryType.equals(ALWAYS_INITIAL_INSTALL) || moduleDeliveryType.equals(CONDITIONAL_INITIAL_INSTALL);
    return moduleType.equals(ModuleType.ASSET_MODULE) && (shouldForceInstallTimeAssetModulesUncompressed || !isInstallTimeModule);
}
Also used : ModuleType(com.android.tools.build.bundletool.model.BundleModule.ModuleType) ModuleDeliveryType(com.android.tools.build.bundletool.model.ModuleDeliveryType)

Aggregations

ModuleType (com.android.tools.build.bundletool.model.BundleModule.ModuleType)1 ModuleDeliveryType (com.android.tools.build.bundletool.model.ModuleDeliveryType)1