Pre-Release Versions
Learn how to test snapshot (pre-release) versions of the Sentry Android Gradle Plugin.
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 Maven Central Snapshots repository to pluginManagement in your project's settings.gradle file:
settings.gradle.ktspluginManagement {
repositories {
maven {
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
}
// existing repositories
}
}
Replace the plugin version in your app/build.gradle file with the snapshot version:
app/build.gradle.ktsplugins {
id("com.android.application")
id("io.sentry.android.gradle") version "6.3.0-SNAPSHOT"
}
The Sentry Kotlin Compiler Plugin snapshots are published from the same repository with the same version. If you're using it, update its version as well:
app/build.gradle.ktsplugins {
id("io.sentry.kotlin.compiler.gradle") version "6.3.0-SNAPSHOT"
}
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 and append -SNAPSHOT.
For example, if the file contains version = 6.3.0, the snapshot version is 6.3.0-SNAPSHOT.
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:
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.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").