# LifecycleTasks

[View Source](https://cs.android.com/search?q=file:com/android/build/api/variant/LifecycleTasks.kt+class:com.android.build.api.variant.LifecycleTasks)  
Added in 8.3.1  

<br />

```
interface LifecycleTasks
```

<br />

*** ** * ** ***

Lifecycle tasks created by the AGP plugins.

A lifecycle task usually does not have any processing associated with it but represent a specific location in the build process that can be used to register dependent tasks. These are also[Task](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html)s that can be invoked by users which provide a consumable output.

## Summary

|                             ### Public functions                             |
|------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [registerPreBuild](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/LifecycleTasks#registerPreBuild(kotlin.Array))`(vararg objects: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Register PreBuild lifecycle task dependencies.      |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [registerPreInstallation](https://developer.android.com/reference/tools/gradle-api/8.13/com/android/build/api/variant/LifecycleTasks#registerPreInstallation(kotlin.Array))`(vararg objects: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`)` Register a Install task dependencies. |

## Public functions

### registerPreBuild

Added in 8.3.1  

```
fun registerPreBuild(vararg objects: Any): Unit
```

Register PreBuild lifecycle task dependencies.  

|                                          Parameters                                          |
|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `vararg objects: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | must comply to Gradle's task dependency rules defined[there](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html#dependencies) |

### registerPreInstallation

Added in 8.13.2  

```
fun registerPreInstallation(vararg objects: Any): Unit
```

Register a Install task dependencies.  

|                                          Parameters                                          |
|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `vararg objects: `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) | must comply to Gradle's task dependency rules defined[there](https://docs.gradle.org/current/javadoc/org/gradle/api/Task.html#dependencies) |