-
-
Notifications
You must be signed in to change notification settings - Fork 229
fix: Generate and inject uuid to apk and upload proguard with that uuid #4532
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
Changes from 10 commits
748ff57
b4da8a3
833f587
0324e89
1bfc327
5023e67
b1aab6d
6fc8146
19db620
8235699
4b01f06
7b9b871
866ceb4
2a6c611
4995dd6
d1505f1
1407ce3
ceccf52
10f9869
0ac6e78
c760398
3df1fc4
30e19d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ | |
|
|
||
| <PropertyGroup> | ||
| <SentryAttributesFile>Sentry.Attributes$(MSBuildProjectExtension.Replace('proj', ''))</SentryAttributesFile> | ||
| <SentryProGuardUUID Condition="'$(SentryProGuardUUID)' == ''">$([System.Guid]::NewGuid())</SentryProGuardUUID> | ||
| </PropertyGroup> | ||
|
|
||
| <Target Name="_SentryEnsureAndroidEnableAssemblyCompressionDisabled" | ||
|
|
@@ -68,7 +69,7 @@ | |
| We're explicitly skipping uploads for Sentry projects because they interfere with CLI integration test asserts. --> | ||
| <UseSentryCLI Condition=" | ||
| '$(UseSentryCLI)' == '' | ||
| and ('$(SentryUploadSymbols)' == 'true' or '$(SentryUploadSources)' == 'true' or $(SentryUploadAndroidProguardMapping) == 'true' or $(SentryCreateRelease) == 'true' or $(SentrySetCommits) == 'true') | ||
| and ('$(SentryUploadSymbols)' == 'true' or '$(SentryUploadSources)' == 'true' or $(SentryUploadAndroidProGuardMapping) == 'true' or $(SentryCreateRelease) == 'true' or $(SentrySetCommits) == 'true') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note(docs): Afterwards, please also update the documentation with the new capitalization. https://docs.sentry.io/platforms/dotnet/configuration/msbuild/
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll make it a part of this pr: |
||
| and '$(MSBuildProjectName)' != 'Sentry' | ||
| and !$(MSBuildProjectName.StartsWith('Sentry.'))">true</UseSentryCLI> | ||
| </PropertyGroup> | ||
|
|
@@ -125,11 +126,14 @@ | |
| <SentrySetCommitReleaseOptions Condition="'$(SentryOrg)' != ''">$(SentrySetCommitReleaseOptions) --org $(SentryOrg)</SentrySetCommitReleaseOptions> | ||
| <SentrySetCommitReleaseOptions Condition="'$(SentryProject)' != ''">$(SentrySetCommitReleaseOptions) --project $(SentryProject)</SentrySetCommitReleaseOptions> | ||
|
|
||
| <_SentryCLIProGuardOptions Condition="'$(SentryProGuardUUID)' != ''">$(_SentryCLIProGuardOptions) --uuid "$(SentryProGuardUUID)"</_SentryCLIProGuardOptions> | ||
| <_SentryCLIProGuardOptions Condition="'$(_SentryCLIProGuardOptions.Trim())' != ''">$(_SentryCLIProGuardOptions.Trim())</_SentryCLIProGuardOptions> | ||
|
|
||
| <SentryCLIUploadOptions Condition="'$(SentryOrg)' != ''">$(SentryCLIUploadOptions) --org $(SentryOrg)</SentryCLIUploadOptions> | ||
| <SentryCLIUploadOptions Condition="'$(SentryProject)' != ''">$(SentryCLIUploadOptions) --project $(SentryProject)</SentryCLIUploadOptions> | ||
| <SentryCLIDebugFilesUploadCommand>$(SentryCLIBaseCommand) debug-files upload</SentryCLIDebugFilesUploadCommand> | ||
| <SentryCLIDebugFilesUploadCommand Condition="'$(SentryCLIUploadOptions.Trim())' != ''">$(SentryCLIDebugFilesUploadCommand) $(SentryCLIUploadOptions.Trim())</SentryCLIDebugFilesUploadCommand> | ||
| <SentryCLIProGuardMappingUploadCommand>$(SentryCLIBaseCommand) upload-proguard</SentryCLIProGuardMappingUploadCommand> | ||
| <SentryCLIProGuardMappingUploadCommand>$(SentryCLIBaseCommand) upload-proguard $(_SentryCLIProGuardOptions)</SentryCLIProGuardMappingUploadCommand> | ||
| <SentryCLIProGuardMappingUploadCommand Condition="'$(SentryCLIUploadOptions.Trim())' != ''">$(SentryCLIProGuardMappingUploadCommand) $(SentryCLIUploadOptions.Trim())</SentryCLIProGuardMappingUploadCommand> | ||
| </PropertyGroup> | ||
|
|
||
|
|
@@ -267,9 +271,22 @@ | |
| <Warning Condition="'$(_SentryCLIExitCode)' != '0'" Text="Sentry CLI could not upload debug files." /> | ||
| </Target> | ||
|
|
||
| <!-- Upload Android Proguard mapping file to Sentry after the build. --> | ||
| <Target Name="UploadAndroidProguardMappingFileToSentry" AfterTargets="Build" DependsOnTargets="PrepareSentryCLI" | ||
| Condition="'$(SentryCLI)' != '' and '$(SentryUploadAndroidProguardMapping)' == 'true' And '$(AndroidProguardMappingFile)' != ''"> | ||
| <Target Name="UpdateAndroidMetadata" BeforeTargets="GetAssemblyAttributes" | ||
| Condition=" | ||
| $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' | ||
| and '$(SentryUploadAndroidProGuardMapping)' == 'true'"> | ||
|
|
||
| <ItemGroup> | ||
| <AssemblyAttribute Include="Android.App.MetaData"> | ||
| <_Parameter1>io.sentry.proguard-uuid</_Parameter1> | ||
jamescrosswell marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Value>$(SentryProGuardUUID)</Value> | ||
| </AssemblyAttribute> | ||
| </ItemGroup> | ||
| </Target> | ||
|
|
||
| <!-- Upload Android ProGuard mapping file to Sentry after the build. --> | ||
| <Target Name="UploadAndroidProGuardMappingFileToSentry" AfterTargets="Build" DependsOnTargets="PrepareSentryCLI" | ||
| Condition="'$(SentryCLI)' != '' and '$(SentryUploadAndroidProGuardMapping)' == 'true' And '$(AndroidProguardMappingFile)' != ''"> | ||
|
|
||
| <Message Importance="High" Text="Preparing to upload Android Proguard mapping to Sentry for '$(MSBuildProjectName)': $(AndroidProguardMappingFile))" /> | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.