Skip to content

[build] Replace custom <DownloadUri/> task with built-in <DownloadFile/>#11330

Merged
simonrozsival merged 1 commit into
mainfrom
dev/peppers/delete-downloaduri
May 13, 2026
Merged

[build] Replace custom <DownloadUri/> task with built-in <DownloadFile/>#11330
simonrozsival merged 1 commit into
mainfrom
dev/peppers/delete-downloaduri

Conversation

@jonathanpeppers
Copy link
Copy Markdown
Member

Delete the custom DownloadUri MSBuild task and use the standard <DownloadFile/> task instead, which has built-in support for retries and skip-unchanged behavior.

The custom task was only used in bundletool.targets (and declared but unused in aapt2.targets), so the migration is straightforward.

…File/>`

Delete the custom `DownloadUri` MSBuild task and use the standard
`<DownloadFile/>` task instead, which has built-in support for
retries and skip-unchanged behavior.

The custom task was only used in `bundletool.targets` (and declared
but unused in `aapt2.targets`), so the migration is straightforward.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 12, 2026 21:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the custom Xamarin.Android.BuildTools.PrepTasks.DownloadUri MSBuild task and switches the bundletool download flow to MSBuild’s <DownloadFile/> task, while also adding an integrity check for the downloaded bundletool JAR.

Changes:

  • Replaced <DownloadUri/> usage in bundletool.targets with <DownloadFile/>, including retry configuration.
  • Added a SHA256 verification step for the downloaded bundletool-all-$(XABundleToolVersion).jar, backed by a new $(XABundleToolHash) property.
  • Removed unused <UsingTask/> declarations for DownloadUri and deleted the DownloadUri task implementation.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/bundletool/bundletool.targets Use <DownloadFile/> to fetch bundletool and verify the downloaded JAR via SHA256.
src/aapt2/aapt2.targets Remove the unused <UsingTask/> declaration for the deleted DownloadUri task.
Configuration.props Add default XABundleToolHash value used for bundletool integrity verification.
build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/DownloadUri.cs Delete the custom download task implementation now replaced by <DownloadFile/>.

@simonrozsival simonrozsival merged commit 3682bb5 into main May 13, 2026
7 checks passed
@simonrozsival simonrozsival deleted the dev/peppers/delete-downloaduri branch May 13, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants