Skip to content

Rebuild Compose.Material3.Android to pick up CornerBasedShape APIs (#1452)#1469

Open
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers/effective-chainsaw
Open

Rebuild Compose.Material3.Android to pick up CornerBasedShape APIs (#1452)#1469
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers/effective-chainsaw

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Fixes #1452.

What's happening

When Xamarin.AndroidX.Compose.Material3Android 1.4.0.3 was packaged in #1418, several of its Compose dependencies were still empty facades. Real bindings for Compose.UI.Graphics, Compose.UI.Text, Compose.UI.Unit, and parts of Compose.Foundation were un-stripped after that release in #1438, #1440, #1448, #1454, and #1458.

In particular, androidx.compose.foundation.shape.CornerBasedShape was not resolvable to the binding generator at the time material3-android was built, so the generator silently dropped every member that referenced it — including the Shapes(extraSmall, small, medium, large, extraLarge) secondary constructor reported in #1452, the Shapes.{ExtraSmall, Small, Medium, Large, ExtraLarge} properties, Shapes.Copy(...), and the *Defaults.GetShape(...) / SegmentedButtonDefaults.GetBaseShape(...) accessors across the package.

Evidence

Same source, just a rebuild against the current dependency graph:

Published 1.4.0.3 Shapes Fresh build (1.4.0.4) Shapes
References to CornerBasedShape 0 27
Public members Shapes() only Shapes(), Shapes(CornerBasedShape × 5), ExtraSmall, Small, Medium, Large, ExtraLarge, Copy(CornerBasedShape × 5), …

(Note: the issue was filed against ShapesKt.Shapes(...) — that top-level Kotlin function does not exist upstream. The actual missing API is the secondary constructor new Shapes(extraSmall, small, medium, large, extraLarge) on the Shapes class. The reporter's recommended call site, Shapes(extraSmall = ..., small = ..., ...), will work once this constructor is bound.)

What this PR does

  • config.json: bumps material3-android nugetVersion 1.4.0.31.4.0.4 so the rebuilt assembly actually ships.
  • source/androidx.compose.material3/material3-android/PublicAPI/PublicAPI.Unshipped.txt: records the ~446 newly-bound members. This file is auto-regenerated by Mono.ApiTools.MSBuildTasks via _GeneratePublicApiFiles in Directory.Build.targets; the diff is just the PublicApiAnalyzer baseline catching up to reality.

No source-level transforms or Metadata.xml changes are needed — rebuilding against the now-real Compose dependencies is the actual fix.

…1452)

Fixes #1452.

When `Xamarin.AndroidX.Compose.Material3Android 1.4.0.3` was packaged in
PR #1418, several of its Compose dependencies were still empty facades
(real bindings for `Compose.UI.Graphics`, `Compose.UI.Text`, `Compose.UI.Unit`,
and parts of `Compose.Foundation` were un-stripped *after* that release in
PRs #1438, #1440, #1448, #1454, #1458). In particular,
`androidx.compose.foundation.shape.CornerBasedShape` was not resolvable
to the binding generator at the time `material3-android` was built, so
the generator silently dropped every member that referenced it -
including the `Shapes(extraSmall, small, medium, large, extraLarge)`
secondary constructor reported in #1452, the
`Shapes.{ExtraSmall, Small, Medium, Large, ExtraLarge}` properties,
`Shapes.Copy(...)`, and the `*Defaults.GetShape(...)` /
`SegmentedButtonDefaults.GetBaseShape(...)` accessors across the
package.

Concretely, `Xamarin.AndroidX.Compose.Material3.Shapes` in the published
1.4.0.3 binary has zero references to `CornerBasedShape` and only
exposes the no-arg `Shapes()` ctor. A fresh rebuild against the current
dependency graph produces 27 references to `CornerBasedShape` on that
same class, including the 5-arg ctor.

No source/transform changes are required - rebuilding against the now-
real Compose dependencies is the fix. This bumps the NuGet revision so
the rebuilt assembly actually ships, and refreshes
`PublicAPI.Unshipped.txt` to record the ~446 newly bound members
(auto-regenerated by `Mono.ApiTools.MSBuildTasks` in
`_GeneratePublicApiFiles`).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 11, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown

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 rebuilds the androidx.compose.material3:material3-android binding so the Xamarin.AndroidX.Compose.Material3Android NuGet ships the now-bindable CornerBasedShape-related APIs (and other members that were previously dropped when Compose dependencies were still empty facades).

Changes:

  • Bumps Xamarin.AndroidX.Compose.Material3Android nugetVersion from 1.4.0.3 to 1.4.0.4 to publish the rebuilt assembly.
  • Updates the material3-android PublicAPI baseline to include the newly surfaced members (including Shapes(CornerBasedShape × 5), Shapes.Copy(...), ShapeDefaults.*, and many related *Defaults.GetShape(...) accessors).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
config.json Bumps material3-android nugetVersion to ship the rebuilt binding.
source/androidx.compose.material3/material3-android/PublicAPI/PublicAPI.Unshipped.txt Regenerated PublicAPI baseline capturing the newly bound Material3 APIs.

Comment thread config.json
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.

Compose Material3: ShapesKt.Shapes(...) builder missing from binding (no inline-class params, not blocked on java-interop#1440)

2 participants