Repository navigation
[Microsoft.Android.Build.Tasks] Prepare typemap paths for -mt - #13468
Merged
Merged
Conversation
Resolve physical paths through TaskEnvironment while preserving output item identities. This is initial preparation for -mt support in the large GenerateTrimmableTypeMap task; it does not enable MT. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the task-relative path resolution changes.
No open issues 🎉
What changed in this PR
Prepares GenerateTrimmableTypeMap for future MSBuild -mt support by resolving physical paths through TaskEnvironment while preserving output item identities. This PR does not enable multithreaded execution.
Changes:
- Makes assembly loading, Java source handling, manifest output, and fingerprint caching use task-relative physical paths.
- Adds a two-directory regression test covering relative paths, output identities, fingerprint reuse, and stale Java cleanup.
| File | Description |
|---|---|
src/Microsoft.Android.Build.Tasks/Tests/Microsoft.Android.Build.Tasks.Tests/GenerateTrimmableTypeMapTests.cs |
Adds task-directory path resolution and incremental-output regression coverage. |
src/Microsoft.Android.Build.Tasks/Tasks/GenerateTrimmableTypeMap.cs |
Resolves file-system operations through TaskEnvironment without changing generated item identities. |
Review effort: Balanced
simonrozsival
approved these changes
Nov 11, 2026
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Initial preparation for
-mtsupport in the largeGenerateTrimmableTypeMaptask. Resolve physical file paths throughTaskEnvironmentwhile preserving output item identities. This does not enable MT.Adds a two-directory test for relative paths, fingerprint reuse, and stale Java cleanup.
Tested locally:
dotnet-local.cmd build Microsoft.Android.slnx -t:BuildDotNet -c Release -p:AndroidSdkDirectory=D:\android-toolchain\sdk -p:AndroidNdkDirectory=D:\android-toolchain\ndk -p:JavaSdkDirectory=D:\android-toolchain\jdk-21 -nr:false— passed; 86 existing binding warnings..\dotnet-local.cmd build src\Microsoft.Android.Build.Tasks\Microsoft.Android.Build.Tasks.csproj --no-restore -c Release -m -mt -nr:false -p:_AndroidTreatWarningsAsErrors=true -warnaserror:MSB4286,MSB4287,MSB4288 -v quiet— passed; no warnings..\dotnet-local.cmd test bin\TestRelease\net12.0\Microsoft.Android.Build.Tasks.Tests.dll --filter FullyQualifiedName~GenerateTrimmableTypeMapTests— 39 passed, none skipped.