-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for generating or passing UUID when uploading progurad mapping on .NET MAUI #3872
Comments
Checks out, without Here's we add it to the gradle plugin: The app also needs to know what the Ideally we use meta-data, like the docs you linked say: <application>
<meta-data
android:name="io.sentry.proguard-uuid"
android:value="A_VALID_UUID"
/>
</application> |
I managed to find a workaround until this bug will be fixed: <PropertyGroup Condition="'$(Configuration)'=='Release'">
<ProguardUuid>$([System.Guid]::NewGuid())</ProguardUuid>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)'=='Release'">
<AssemblyAttribute Include="Android.App.MetaData">
<_Parameter1>"io.sentry.proguard-uuid", Value = "$(ProguardUuid)"</_Parameter1>
<_Parameter1_IsLiteral>true</_Parameter1_IsLiteral>
</AssemblyAttribute>
</ItemGroup>
<!-- Upload Android Proguard mapping file to Sentry after the build. -->
<Target Name="CustomUploadAndroidProguardMappingFileToSentry" AfterTargets="UploadDebugInfoToSentry" DependsOnTargets="PrepareSentryCLI"
Condition="'$(SentryCLI)' != '' And '$(AndroidProguardMappingFile)' != '' And '$(Configuration)'=='Release'">
<Message Importance="High" Text="Preparing to upload Android Proguard mapping to Sentry for '$(MSBuildProjectName)': $(AndroidProguardMappingFile))" />
<Exec Command="$(SentryCLIProGuardMappingUploadCommand) --uuid "$(ProguardUuid)" --app-id "$(ApplicationId)" --version "$(ApplicationDisplayVersion)" --version-code "$(ApplicationVersion)" $(AndroidProguardMappingFile)" IgnoreExitCode="true" ContinueOnError="WarnAndContinue">
<Output TaskParameter="ExitCode" PropertyName="_SentryCLIExitCode" />
</Exec>
<Warning Condition="'$(_SentryCLIExitCode)' != '0'" Text="Sentry CLI could not upload proguard mapping." />
</Target>
please note than I use separated platform project and these entries I added only to my Android projects. |
Thank you for sharing that! would you be willing to share that fix in a PR? We have a single file where we do the sentry cli commands. it just missed these its u figured out already. |
Sure! |
Problem Statement
Uploading a progurad file by
<SentryUploadAndroidProguardMapping>
but this file is not associated with any releaseAccording https://docs.sentry.io/cli/dif/#uploading-files this association requires adding
io.sentry.proguard-uuid
meetadata to and usingsentry-cli upload-proguard --uuid ...
Solution Brainstorm
Preferred solution: Generate UUID, inject it to
AndroidManifest.xml
and use during uploadingor: read this UUID from
AndroidManifest.xml
and use during uploadingor: add support for an environment variable
BTW: Shouldn't other switches
--app-id my.app.id
,--version
.--version-code
be used as well?The text was updated successfully, but these errors were encountered: