getsentry / sentry-android-gradle-plugin

Gradle plugin for Sentry Android. Upload proguard, debug files, and more.

Home Page:https://docs.sentry.io/platforms/android/gradle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gradle plugin should be independent of CLI and SDK version

pvdmde opened this issue · comments

Problem Statement

Users of the plugin should be able to update it without updating the other components.
Is there a technical reason why newest versions are forced?

Solution Brainstorm

No response

hey, we simply bump the versions because we've tested their compatibility with the new gradle plugin version. You're actually not forced in any way, you can always override both the SDK and the CLI versions:

// SDK version
sentry {
  autoInstallation.sentryVersion.set("7.0.0")
}

// CLI version in your sentry.properties file
defaults.org=...
defaults.project=...
cli.executable=path/to/your/sentrycli

does that help?

@pvdmde did you have any time to look into the answer above?

I wrote a Story to try the autoInstallation and see if it works as expected. Might take a while.

I still think a tool should not depend on the newest version of its dependency without any good reason, but rather document its compatibility matrix.

Let the consumers control the version with their tools (Gradle) instead of a custom DSL.

Does the plugin actually need Sentry to do it's job? It feels not right actually.

no, it's a feature, that you can just disable if you don't see fit for your usecase and control the SDK dependency version yourself:

sentry {
  autoInstallation.enabled.set(false)
}

dependencies {
  implementation("io.sentry:sentry-android:7.0.0") // <-- this won't get overwritten now
}

@pvdmde we're gonna close this issue, because, as I mentioned, you can disable the feature, and it's optional - noone is enforcing you to use a specific version of the SDK. Feel free to comment here or open a new issue if you encounter other problems. Thank you!