Stay organized with collections
Save and categorize content based on your preferences.
KeepRules
@Incubating interface KeepRules
DSL object for external library dependencies keep rules configurations.
Summary
Public functions |
@Incubating Unit |
Ignore keep rules from all the external dependencies.
|
@Incubating Unit |
Ignore keep rules from listed external dependencies.
|
Public functions
ignoreExternalDependencies
@Incubating
fun ignoreExternalDependencies(vararg ids: String): Unit
Ignore keep rules from listed external dependencies. External dependencies can be specified via GAV coordinates(e.g. "groupId:artifactId:version") or in the format of "groupId:artifactId" in which case dependencies are ignored as long as they match groupId & artifactId.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# KeepRules\n=========\n\n\n```\n@Incubating interface KeepRules\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nDSL object for external library dependencies keep rules configurations.\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) | [ignoreAllExternalDependencies](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/KeepRules#ignoreAllExternalDependencies(kotlin.Boolean))`(ignore: `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Ignore keep rules from all the external dependencies. |\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) | [ignoreExternalDependencies](/reference/tools/gradle-api/8.0/com/android/build/api/dsl/KeepRules#ignoreExternalDependencies(kotlin.Array))`(vararg ids: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`)` Ignore keep rules from listed external dependencies. |\n\nPublic functions\n----------------\n\n### ignoreAllExternalDependencies\n\n```\n@Incubating\nfun ignoreAllExternalDependencies(ignore: Boolean): Unit\n```\n\nIgnore keep rules from all the external dependencies. \n\n### ignoreExternalDependencies\n\n```\n@Incubating\nfun ignoreExternalDependencies(vararg ids: String): Unit\n```\n\nIgnore keep rules from listed external dependencies. External dependencies can be specified via GAV coordinates(e.g. \"groupId:artifactId:version\") or in the format of \"groupId:artifactId\" in which case dependencies are ignored as long as they match groupId \\& artifactId."]]