Skip to content

Download Android SDK during restore #1732

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

Merged
merged 1 commit into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed libs/Android/sentry-6.0.0.jar
Binary file not shown.
Binary file removed libs/Android/sentry-android-core-6.0.0.aar
Binary file not shown.
Binary file removed libs/Android/sentry-android-ndk-6.0.0.aar
Binary file not shown.
23 changes: 10 additions & 13 deletions src/Sentry/Android/Sentry.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- 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.) -->
<NoWarn>$(NoWarn);BG8605;BG8606</NoWarn>
<SentryAndroidSdkVersion>6.0.0</SentryAndroidSdkVersion>
<AndroidLibsDirectory>$(MSBuildProjectDirectory)/../../libs/Android/</AndroidLibsDirectory>
<AndroidLibsDirectory>$(BaseIntermediateOutputPath)\libs\Android\</AndroidLibsDirectory>
<LangVersion>10</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>
Expand All @@ -15,8 +15,8 @@
<TransformFile Include="Android/Transforms/*.xml" />
<!-- TODO: How to add JavaDocPaths for each package? -->
<AndroidLibrary Include="$(AndroidLibsDirectory)sentry-$(SentryAndroidSdkVersion).jar" />
<AndroidLibrary Include="$(AndroidLibsDirectory)/sentry-android-core-$(SentryAndroidSdkVersion).aar" />
<AndroidLibrary Include="$(AndroidLibsDirectory)/sentry-android-ndk-$(SentryAndroidSdkVersion).aar" />
<AndroidLibrary Include="$(AndroidLibsDirectory)sentry-android-core-$(SentryAndroidSdkVersion).aar" />
<AndroidLibrary Include="$(AndroidLibsDirectory)sentry-android-ndk-$(SentryAndroidSdkVersion).aar" />
</ItemGroup>

<ItemGroup>
Expand All @@ -42,24 +42,21 @@
<Using Include="Java.Util.Date" Alias="JavaDate" />
</ItemGroup>

<!-- Update Android SDK: Update SentryAndroidSdkVersion and run:
dotnet msbuild src/Sentry /t:DownloadSentryAndroidSdk /p:TargetFramework=net6.0-android -->
<Target Name="DownloadSentryAndroidSdk">
<RemoveDir Directories="$(AndroidLibsDirectory)" />
<Target Name="DownloadSentryAndroidSdk" BeforeTargets="CollectPackageReferences">
<DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry-android-core/$(SentryAndroidSdkVersion)/sentry-android-core-$(SentryAndroidSdkVersion).aar"
DestinationFolder="$(AndroidLibsDirectory)"
SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
Condition="!Exists('$(AndroidLibsDirectory)sentry-android-core-$(SentryAndroidSdkVersion).aar')">
<Output TaskParameter="DownloadedFile" ItemName="None" />
</DownloadFile>
<DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry-android-ndk/$(SentryAndroidSdkVersion)/sentry-android-ndk-$(SentryAndroidSdkVersion).aar"
DestinationFolder="$(AndroidLibsDirectory)"
SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
Condition="!Exists('$(AndroidLibsDirectory)sentry-android-ndk-$(SentryAndroidSdkVersion).aar')">
<Output TaskParameter="DownloadedFile" ItemName="None" />
</DownloadFile>
<DownloadFile SourceUrl="https://repo1.maven.org/maven2/io/sentry/sentry/$(SentryAndroidSdkVersion)/sentry-$(SentryAndroidSdkVersion).jar"
DestinationFolder="$(AndroidLibsDirectory)"
SkipUnchangedFiles="true">
<Output TaskParameter="DownloadedFile" ItemName="Content" />
Condition="!Exists('$(AndroidLibsDirectory)sentry-$(SentryAndroidSdkVersion).jar')">
<Output TaskParameter="DownloadedFile" ItemName="None" />
</DownloadFile>
</Target>

Expand Down