|
5 | 5 | <!-- BG8605 and BG8606 happen because there's a missing androidx.lifecycle dependency, but we don't need it here. (The native Android Sentry SDK will use it if it exists.) -->
|
6 | 6 | <NoWarn>$(NoWarn);BG8605;BG8606</NoWarn>
|
7 | 7 | <SentryAndroidSdkVersion>6.0.0</SentryAndroidSdkVersion>
|
8 |
| - <AndroidLibsDirectory>$(MSBuildProjectDirectory)/../../libs/Android/</AndroidLibsDirectory> |
| 8 | + <AndroidLibsDirectory>$(BaseIntermediateOutputPath)\libs\Android\</AndroidLibsDirectory> |
9 | 9 | <LangVersion>10</LangVersion>
|
10 | 10 | <ImplicitUsings>true</ImplicitUsings>
|
11 | 11 | </PropertyGroup>
|
|
15 | 15 | <TransformFile Include="Android/Transforms/*.xml" />
|
16 | 16 | <!-- TODO: How to add JavaDocPaths for each package? -->
|
17 | 17 | <AndroidLibrary Include="$(AndroidLibsDirectory)sentry-$(SentryAndroidSdkVersion).jar" />
|
18 |
| - <AndroidLibrary Include="$(AndroidLibsDirectory)/sentry-android-core-$(SentryAndroidSdkVersion).aar" /> |
19 |
| - <AndroidLibrary Include="$(AndroidLibsDirectory)/sentry-android-ndk-$(SentryAndroidSdkVersion).aar" /> |
| 18 | + <AndroidLibrary Include="$(AndroidLibsDirectory)sentry-android-core-$(SentryAndroidSdkVersion).aar" /> |
| 19 | + <AndroidLibrary Include="$(AndroidLibsDirectory)sentry-android-ndk-$(SentryAndroidSdkVersion).aar" /> |
20 | 20 | </ItemGroup>
|
21 | 21 |
|
22 | 22 | <ItemGroup>
|
|
42 | 42 | <Using Include="Java.Util.Date" Alias="JavaDate" />
|
43 | 43 | </ItemGroup>
|
44 | 44 |
|
45 |
| - <!-- Update Android SDK: Update SentryAndroidSdkVersion and run: |
46 |
| - dotnet msbuild src/Sentry /t:DownloadSentryAndroidSdk /p:TargetFramework=net6.0-android --> |
47 |
| - <Target Name="DownloadSentryAndroidSdk"> |
48 |
| - <RemoveDir Directories="$(AndroidLibsDirectory)" /> |
| 45 | + <Target Name="DownloadSentryAndroidSdk" BeforeTargets="CollectPackageReferences"> |
49 | 46 | <DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry-android-core/$(SentryAndroidSdkVersion)/sentry-android-core-$(SentryAndroidSdkVersion).aar"
|
50 | 47 | DestinationFolder="$(AndroidLibsDirectory)"
|
51 |
| - SkipUnchangedFiles="true"> |
52 |
| - <Output TaskParameter="DownloadedFile" ItemName="Content" /> |
| 48 | + Condition="!Exists('$(AndroidLibsDirectory)sentry-android-core-$(SentryAndroidSdkVersion).aar')"> |
| 49 | + <Output TaskParameter="DownloadedFile" ItemName="None" /> |
53 | 50 | </DownloadFile>
|
54 | 51 | <DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry-android-ndk/$(SentryAndroidSdkVersion)/sentry-android-ndk-$(SentryAndroidSdkVersion).aar"
|
55 | 52 | DestinationFolder="$(AndroidLibsDirectory)"
|
56 |
| - SkipUnchangedFiles="true"> |
57 |
| - <Output TaskParameter="DownloadedFile" ItemName="Content" /> |
| 53 | + Condition="!Exists('$(AndroidLibsDirectory)sentry-android-ndk-$(SentryAndroidSdkVersion).aar')"> |
| 54 | + <Output TaskParameter="DownloadedFile" ItemName="None" /> |
58 | 55 | </DownloadFile>
|
59 | 56 | <DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry/$(SentryAndroidSdkVersion)/sentry-$(SentryAndroidSdkVersion).jar"
|
60 | 57 | DestinationFolder="$(AndroidLibsDirectory)"
|
61 |
| - SkipUnchangedFiles="true"> |
62 |
| - <Output TaskParameter="DownloadedFile" ItemName="Content" /> |
| 58 | + Condition="!Exists('$(AndroidLibsDirectory)sentry-$(SentryAndroidSdkVersion).jar')"> |
| 59 | + <Output TaskParameter="DownloadedFile" ItemName="None" /> |
63 | 60 | </DownloadFile>
|
64 | 61 | </Target>
|
65 | 62 |
|
|
0 commit comments