# DexPackaging

[View Source](https://cs.android.com/search?q=file:com/android/build/api/dsl/DexPackaging.kt+class:com.android.build.api.dsl.DexPackaging) Added in 8.0.2


```
interface DexPackaging
```

<br />

*** ** * ** ***

Packaging options for Dex (Android Dalvik Executable) files in the Android DSL

```
android {
    packaging {
        dex {
            useLegacyPackaging = ...
        }
    }
}
```

## Summary

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html?` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/dsl/DexPackaging#useLegacyPackaging()` Whether to use the legacy convention of compressing all dex files in the APK. |

## Public properties

### useLegacyPackaging

Added in 8.0.2

```
var useLegacyPackaging: Boolean?
```

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.