---
title: "Pre-Release Versions"
description: "Learn how to test snapshot (pre-release) versions of the Sentry Android Gradle Plugin."
url: https://docs.sentry.io/platforms/android/configuration/pre-release-versions/
---

# Pre-Release Versions | Sentry for Android

The Sentry Android Gradle Plugin publishes snapshot builds to Maven Central Snapshots on every push to the `main` branch. These snapshots let you test unreleased fixes and features before a stable release.

Snapshot versions are for testing only and should not be used in production. They may contain breaking changes, incomplete features, or undiscovered bugs.

## [Add the Snapshots Repository](https://docs.sentry.io/platforms/android/configuration/pre-release-versions.md#add-the-snapshots-repository)

Add the Maven Central Snapshots repository to `pluginManagement` in your project's `settings.gradle` file:

`settings.gradle.kts`

```kotlin
pluginManagement {
    repositories {
        maven {
            url = uri("https://central.sonatype.com/repository/maven-snapshots/")
        }
        // existing repositories
    }
}
```

## [Set the Snapshot Version](https://docs.sentry.io/platforms/android/configuration/pre-release-versions.md#set-the-snapshot-version)

Replace the plugin version in your `app/build.gradle` file with the snapshot version:

`app/build.gradle.kts`

```kotlin
plugins {
    id("com.android.application")
    id("io.sentry.android.gradle") version "6.3.0-SNAPSHOT"
}
```

## [Kotlin Compiler Plugin](https://docs.sentry.io/platforms/android/configuration/pre-release-versions.md#kotlin-compiler-plugin)

The [Sentry Kotlin Compiler Plugin](https://docs.sentry.io/platforms/android/enhance-errors/kotlin-compiler-plugin.md) snapshots are published from the same repository with the same version. If you're using it, update its version as well:

`app/build.gradle.kts`

```kotlin
plugins {
    id("io.sentry.kotlin.compiler.gradle") version "6.3.0-SNAPSHOT"
}
```

## [Finding the Current Snapshot Version](https://docs.sentry.io/platforms/android/configuration/pre-release-versions.md#finding-the-current-snapshot-version)

The snapshot version matches the development version on the `main` branch with `-SNAPSHOT` appended. To find the current snapshot version, check the `version` property in [`plugin-build/gradle.properties`](https://github.com/getsentry/sentry-android-gradle-plugin/blob/main/plugin-build/gradle.properties) and append `-SNAPSHOT`.

For example, if the file contains `version = 6.3.0`, the snapshot version is `6.3.0-SNAPSHOT`.

## [Gradle Caching](https://docs.sentry.io/platforms/android/configuration/pre-release-versions.md#gradle-caching)

Gradle caches snapshot dependencies by default for 24 hours. To always fetch the latest snapshot, pass `--refresh-dependencies` when building, or configure the repository to skip caching:

```kotlin
configurations.all {
    resolutionStrategy.cacheChangingModulesFor(0, "seconds")
}
```

Once you're done testing, remember to revert to a stable release version and remove the snapshots repository before shipping your app.
