# LibraryKeepRules

# LibraryKeepRules

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

<br />

```
@Incubating
interface LibraryKeepRules : ConfigurableFiles
```

<br />

*** ** * ** ***

## Summary

|                                                                                    ### Public properties                                                                                    |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [MutableSet](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-set/index.html)`<`[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>` | [ignoreFrom](https://developer.android.com/reference/tools/gradle-api/8.11/com/android/build/api/dsl/LibraryKeepRules#ignoreFrom()) Ignore keep rules from listed external dependencies.                                                |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                                          | [ignoreFromAllExternalDependencies](https://developer.android.com/reference/tools/gradle-api/8.11/com/android/build/api/dsl/LibraryKeepRules#ignoreFromAllExternalDependencies()) Ignore keep rules from all the external dependencies. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[com.android.build.api.dsl.ConfigurableFiles](https://developer.android.com/reference/tools/gradle-api/8.11/com/android/build/api/dsl/ConfigurableFiles) |------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html) [file](https://developer.android.com/reference/tools/gradle-api/8.11/com/android/build/api/dsl/ConfigurableFiles#file(kotlin.Any))`(file: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)`             | | [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `@`[Incubating](https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html) [files](https://developer.android.com/reference/tools/gradle-api/8.11/com/android/build/api/dsl/ConfigurableFiles#files(kotlin.Array))`(vararg files: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` | |

|                                                                                                                                                                                                                                                                                                                                                                                                        ### Inherited properties                                                                                                                                                                                                                                                                                                                                                                                                        |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[com.android.build.api.dsl.ConfigurableFiles](https://developer.android.com/reference/tools/gradle-api/8.11/com/android/build/api/dsl/ConfigurableFiles) |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------| | [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`<`[File](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/File.html)`>` | [files](https://developer.android.com/reference/tools/gradle-api/8.11/com/android/build/api/dsl/ConfigurableFiles#files()) | |

## Public properties

### ignoreFrom

Added in 8.2.0  

```
val ignoreFrom: MutableSet<String>
```

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.  

### ignoreFromAllExternalDependencies

Added in 8.2.0  

```
var ignoreFromAllExternalDependencies: Boolean
```

Ignore keep rules from all the external dependencies.