# DexPackaging

# DexPackaging

<br />

```
public interface DexPackaging
```

<br />

*** ** * ** ***

Packaging options for Dex (Android Dalvik Executable) files

## Summary

|                                            ### Public methods                                             |
|-----------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract `[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html) | [getUseLegacyPackaging](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DexPackaging#getUseLegacyPackaging())`()` Whether to use the legacy convention of compressing all dex files in the APK.                                                                                                                                  |
| `abstract void`                                                                                           | [setUseLegacyPackaging](https://developer.android.com/reference/tools/gradle-api/8.3/null/com/android/build/api/dsl/DexPackaging#setUseLegacyPackaging(kotlin.Boolean))`(`[Boolean](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Boolean.html)` useLegacyPackaging)` Whether to use the legacy convention of compressing all dex files in the APK. |

## Public methods

### getUseLegacyPackaging

```
abstract Boolean getUseLegacyPackaging()
```

Whether to use the legacy convention of compressing all dex files in the APK. If null, dex files will be uncompressed when minSdk \>= 28.

This property does not affect dex file compression in APKs produced from app bundles.  

### setUseLegacyPackaging

```
abstract void setUseLegacyPackaging(Boolean useLegacyPackaging)
```

Whether to use the legacy convention of compressing all dex files in the APK. If null, dex files will be uncompressed when minSdk \>= 28.

This property does not affect dex file compression in APKs produced from app bundles.