getsentry / sentry-android-gradle-plugin

Gradle plugin for Sentry Android. Upload proguard, debug files, and more.
https://docs.sentry.io/platforms/android/gradle/
MIT License
143 stars 33 forks source link

error: unexpected argument '--url' found #609

Closed matusfedorko closed 11 months ago

matusfedorko commented 11 months ago

Gradle Version

8.0

AGP Version

8.1.0

Code Minifier/Optimizer

None

Version

4.0.0

Sentry SDK Version

0.5.2

Steps to Reproduce

We use native Sentry SDK (not the Android Sentry Sdk) and a self hosted Sentry instance. I wanted to setup debug symbol uploading for which I added Sentry Android Gradle Plugin to our project as described here: https://docs.sentry.io/platforms/android/configuration/gradle/ In the example setup I changed the following:

orig
projectName
url
uploadNativeSymbols
includeNativeSources
includeSourceContext
tracingInstrumentation.enabled
autoInstallation.enabled
telemetry
ignoredBuildTypes

Expected Result

I expected the plugin to upload debug symbols and sources to our self hosted sentry instance.

Actual Result

I got this error:

error: unexpected argument '--url' found
note: to pass '--url' as a value, use '-- --url'

Then I switched to Sentry Gradle plugin version 3.14.0 and everything works.

(Note I had the same error with Android Gradle plugin version 7.4.2 and Gradle 7.5.1)

markushi commented 11 months ago

Hey @matusfedorko thanks for reporting! Looks like this slipped through in https://github.com/getsentry/sentry-android-gradle-plugin/pull/587/files where the argument order for the underlying sentry-cli command is not correct. We'll have a look at this and provide a fix soon.