# Optimization

# Optimization

<br />

```
@Incubating interface Optimization
```

<br />

*** ** * ** ***

DSL object for configurations aimed for optimizing build process(e.g. speed, correctness). This DSL object is applicable to buildTypes and productFlavors.

## Summary

|                                                                                                                                                                                                                                                                                                                                                     ### Public functions                                                                                                                                                                                                                                                                                                                                                     ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html)` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [keepRules](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/Optimization#keepRules(kotlin.Function1))`(action: @`[ExtensionFunctionType](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html)` `[KeepRules](https://developer.android.com/reference/tools/gradle-api/7.3/com/android/build/api/dsl/KeepRules)`.() `->` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Configure keep rules inherited from external library dependencies |

## Public functions

### keepRules

```
@Incubating
fun keepRules(action: @ExtensionFunctionType KeepRules.() -> Unit): Unit
```

Configure keep rules inherited from external library dependencies