# ReplacedByIncubating

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


```
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.FIELD, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER])
@Retention(value = AnnotationRetention.RUNTIME)
annotation ReplacedByIncubating
```

<br />

*** ** * ** ***

Annotation for APIs that are in the process of being replaced by an `https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html` API.

When replacing a stable method with a new API which is `https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html`, we cannot directly deprecate the old method as it would leave the user to use either between a deprecated or an incubating API.

Therefore, when replacing a public API with a new version, the following rules apply :

- The new API will be annotated with `https://docs.gradle.org/current/javadoc/org/gradle/api/Incubating.html`

- The old API will be annotated with `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/annotations/ReplacedByIncubating` but will not be deprecated yet.

- Once the new API becomes stable, the old API `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/annotations/ReplacedByIncubating` will be replaced with a `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-deprecated/index.html` annotation.

- After the deprecation period has passed, the old API will be removed.

Users can use this annotation presence to start moving their code to the new API if they do not object using an incubating potentially unstable API.

This interface is meant to document the Android Gradle Plugin APIs and should not be used by third party plugins/build logic.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/annotations/ReplacedByIncubating#ReplacedByIncubating(kotlin.String,kotlin.Long)(message: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, bugId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/annotations/ReplacedByIncubating#bugId()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/tools/gradle-api/9.6/com/android/build/api/annotations/ReplacedByIncubating#message()` |

## Public constructors

### ReplacedByIncubating

Added in 9.6.0-alpha03

```
ReplacedByIncubating(message: String, bugId: Long)
```

## Public properties

### bugId

```
val bugId: Long
```

### message

```
val message: String
```