Repository navigation
[release/11.0.1xx] Preserve AAR consumer rules on cache hits - #13077
Merged
Merged
Conversation
Keep extracted AAR proguard.txt entries in the imports cache when the resolver takes the unchanged-AAR path, and cover the incremental R8 flow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The fix matches cold-extraction behavior and includes focused regression coverage; only an optional deduplication suggestion remains.
1 open finding
What changed in this PR
Backports the AAR cache-hit fix so incremental builds retain consumer ProGuard rules for R8.
Changes:
- Restores existing
proguard.txtentries on AAR cache hits. - Adds regression coverage for cache preservation and R8 inputs.
| File | Description |
|---|---|
IncrementalBuildTest.cs |
Tests consumer-rule preservation after timestamp changes. |
ResolveLibraryProjectImports.cs |
Rehydrates ProGuard configuration on cache hits. |
🧠 Review effort: Balanced
Member
Author
|
@dalexsoto review |
simonrozsival
enabled auto-merge (squash)
October 12, 2026 11:41
jonathanpeppers
approved these changes
Oct 12, 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.

Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include:This backports the AAR consumer-rule cache-hit fix from #13061. When the app project timestamp changes,
_ResolveLibraryProjectImportsreruns but unchanged AARs skip extraction; the cache-hit path must still collect the existingproguard.txtso the cache and subsequent R8--pg-confarguments retain the consumer rules.Related issue: #12965.
Validation:
./dotnet-local.sh build src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj -c Debug -v minimal— passed, 0 errors../dotnet-local.sh test bin/TestDebug/net10.0/Xamarin.Android.Build.Tests.dll --filter "Name~AarConsumerRulesRemainInR8ConfigurationAfterAppProjectTimestampChange"— failed as expected because the cache contained no AAR rules.DOTNET_ROOT="$PWD/bin/Debug/dotnet" ./dotnet-local.sh test bin/TestDebug/net10.0/Xamarin.Android.Build.Tests.dll --filter "Name~AarConsumerRulesRemainInR8ConfigurationAfterAppProjectTimestampChange"— passed, 1/1.DOTNET_ROOT="$PWD/bin/Debug/dotnet" ./dotnet-local.sh test bin/TestDebug/net10.0/Xamarin.Android.Build.Tests.dll --filter "Name~ResolveLibraryProjectImports"run passed for CoreCLR. NativeAOT restore was blocked because exact RC2 packages at11.0.0-rc.2.26475.136are unavailable (nearest ILCompiler package.137).The pinned servicing SDK
11.0.100-rtm.26480.113could not be downloaded. These tests used the installed .NET 11 RC2 SDK with a temporary local pack overlay, which was removed after validation.make leeroywas not run.