# DexPackagingOptions

# DexPackagingOptions

```
@Incubating interface DexPackagingOptions
```

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [com.android.build.api.variant.DexPackagingOptions](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/DexPackagingOptions#) |

Defines an APK variant's packaging options for dex files.

## Summary

|                                                                                                                                                                                                                         ### Properties                                                                                                                                                                                                                          ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract[Property](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/Property.html)\<[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)\> | [useLegacyPackaging](https://developer.android.com/reference/tools/gradle-api/4.2/com/android/build/api/variant/DexPackagingOptions#useLegacyPackaging:org.gradle.api.provider.Property) Whether to use the legacy convention of compressing all dex files in the APK. |

## Properties

### useLegacyPackaging

```
abstract val useLegacyPackaging: Property<Boolean>
```

Whether to use the legacy convention of compressing all dex files in the APK.

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