Stay organized with collections
Save and categorize content based on your preferences.
Optimization
@Incubating interface Optimization
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 Unit |
Configure keep rules inherited from external library dependencies
|
Public functions
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Optimization\n============\n\n\n```\n@Incubating interface Optimization\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDSL object for configurations aimed for optimizing build process(e.g. speed, correctness). This DSL object is applicable to buildTypes and productFlavors.\n\nSummary\n-------\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `@`[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](/reference/tools/gradle-api/8.1/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](/reference/tools/gradle-api/8.1/com/android/build/api/dsl/KeepRules)`.() `-\u003e` `[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`)` Configure keep rules inherited from external library dependencies |\n\nPublic functions\n----------------\n\n### keepRules\n\n```\n@Incubating\nfun keepRules(action: @ExtensionFunctionType KeepRules.() -\u003e Unit): Unit\n```\n\nConfigure keep rules inherited from external library dependencies"]]