Repository navigation
[release/11.0.1xx] [Build.Tasks] Replace Dalvik collection with MSBuild items - #13690
Conversation
Backport the Dalvik archive item construction only. Preserve the release CollectAssemblyFilesToCompress registration and all release-only packaging content. (cherry picked from commit 9535641) Co-authored-by: Copilot App <[email protected]>
|
Closing: this PR was opened by an automated session in error. The backport commit is kept locally for review by the coordinating session. |
There was a problem hiding this comment.
🟢 Approval recommended
The Android dex-file collection backport has no active review issues.
No open issues 🎉
What changed in this PR
Backports #13387 to release/11.0.1xx, simplifying dex-file collection in Android packaging by replacing a custom task with MSBuild item operations.
Changes:
- Replaces both collection calls while preserving ordering, duplicates,
ApkNameoverrides, whitespace fallback, and case-insensitive AAB prefix handling. - Isolates archive metadata and clears temporary items after collection.
- Removes the unused task and its registration, retaining release-specific packaging content.
| File | Description |
|---|---|
src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets |
Replaces both task calls with item operations and removes the task registration. |
src/Xamarin.Android.Build.Tasks/Tasks/CollectDalvikFilesForArchive.cs |
Deletes the superseded collection task. |
Review effort: Balanced
|
Reopened: this PR was closed in error. |
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed 16a498d5 against release/11.0.1xx at ea3a55f1. This is a static, read-only review.
LGTM. I checked this backport against the deleted CollectDalvikFilesForArchive at the merge base. The new item logic in Xamarin.Android.Common.targets (lines 2319–2332 and 2444–2457) gives the same results:
- The
dex/prefix still applies only foraab(case-insensitive). - The file-name fallback still uses
GetFileName, andApkNameoverrides it unless it is empty or whitespace. - The in-place update keeps item order and duplicates, and
KeepMetadata="ArchivePath"givesBuildArchiveexactly the metadata the old task output (ArchivePathonly, noJavaArchiveEntry). - The temporary
_AndroidDalvikFilesitems are removed in both targets, and the incremental build inputs are unchanged.
Both blocks are byte-identical to #13387 on main. The release-only CollectAssemblyFilesToCompress registration is kept, and nothing else in the tree references the removed task. The newer commits on release/11.0.1xx change a different part of Xamarin.Android.Common.targets (GetAppSettingsDirectory), and the just-merged #13683 only touches AndroidSdk EmulatorRunner/PublicAPI files, so this should merge cleanly.
Backport of #13387.
Replace the two Dalvik collection task calls with MSBuild items and remove the unused task. This avoids a custom task call for a simple item transformation. Preserve file order, duplicate inputs,
ApkNameoverrides, whitespace fallback, and the case-insensitive AABdex/prefix.The conflict was in the
<UsingTask>registrations. Keep the release branch'sXamarin.Android.Tasks.CollectAssemblyFilesToCompressregistration and remove onlyCollectDalvikFilesForArchive. All release-only packaging content stays unchanged. The releaseBuildArchiveconsumer readsArchivePathandJavaArchiveEntryin the same way as main;KeepMetadata="ArchivePath"prevents unrelated metadata from reaching it. No multithreaded task infrastructure is included.Validation:
dotnet-local.cmd build Microsoft.Android.slnx -c Debug -nodeReuse:false -v:minimal -bl:<session-files>\product-build.binlog: passed, 0 errors.AAB, prefix reset, item order, non-adjacent duplicates,ApkNameoverrides, whitespace fallback, metadata isolation, unchanged source metadata, and temporary-item cleanup.git diff origin/release/11.0.1xx HEAD --check: passed.git grep -n CollectDalvikFilesForArchive: no remaining references.Full packaging tests were not completed. Local workload setup required extra API-level builds; those builds were stopped at the user's request. Full validation will run in CI. The source PR did not change any tests.
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include: