Commit f0ae2b1
authored
Un-strip Compose Animation bindings (animation-android, animation-core-android) (#1448)
`Xamarin.AndroidX.Compose.Animation.Android` and `Xamarin.AndroidX.Compose.Animation.Core.Android` shipped empty — a blanket `<remove-node path="/api/package" />` stripped every type in `androidx.compose.animation.*` and `androidx.compose.animation.core.*`, so nothing (`Animatable`, `Transition`, `EnterTransition`, animation specs, easing curves, …) was reachable from C#.
This replaces the blanket strip with surgical transforms plus the two compile dependencies that were actually missing, so the supporting type system binds.
### `animation-core-android` — targeted `remove-node` transforms
Removes only nodes that genuinely can't bind due to binder limitations:
- **`vectorize` methods** — Kotlin's `AnimationSpec` hierarchy uses covariant generic return types (`AnimationSpec`→`VectorizedAnimationSpec`, `FiniteAnimationSpec`→`VectorizedFiniteAnimationSpec`, …), inexpressible in C# (CS0738/CS0535/CS9334).
- **`VectorizedAnimationSpec.isInfinite`** — a Kotlin default interface property mis-marked abstract by class-parse, so concrete `Vectorized*` classes failed to implement it.
- **`TransitionState.getCurrentState/getTargetState`** — generic erasure yields un-overridable abstract `Raw*State` members on the base (CS0534).
- **Colliding `DecayAnimation` ctor** — two constructors whose generic params (`T` / `AnimationVector`) both erase to `Object` (CS0111).
### Internal packages removed
The internal Kotlin packages `androidx.compose.animation.core.internal` and `androidx.compose.animation.internal` only exposed implementation-detail facade helpers (`JvmDefaultWithCompatibility_jvmAndAndroidKt`, `PlatformOptimizedCancellationException*`), which are not useful public API. Both packages are now removed via `remove-node` transforms, and the corresponding `AndroidX.Compose.Animation.Core.Internal` / `AndroidX.Compose.Animation.Internal` namespaces were dropped from `published-namespaces.txt` and `PublicAPI.Unshipped.txt`. The public `@InternalAnimationApi` opt-in annotation lives in the `core` package (not `core.internal`) and is preserved.
### Dependency additions (preserve API instead of stripping it)
Two members referenced types only reachable as second-level transitive deps, unavailable at compile time. Added via `extraDependencies` rather than deleting the members:
- `animation-core-android` → `kotlinx-coroutines-core-jvm` (so `DeferredTargetAnimation.updateTarget(CoroutineScope)` binds).
- `animation-android` → `ui-unit-android` (so `SharedTransitionScope : Density` and `SplineBased*` bind).
### Packaging / metadata
- `nugetVersion` bumped `1.11.2` → `1.11.2.1` for both packages.
- New namespaces added to `published-namespaces.txt`; `docs/artifact-list-with-versions.md` updated.
- Regenerated `PublicAPI.Unshipped.txt` (core: 614 entries, animation: 227).
### Known limitation
Most user-facing `@Composable`s (`AnimatedVisibility`, `Crossfade`, …) remain stripped because their `@JvmInline value class` parameters block binding pending dotnet/java-interop#1440; they should reappear once it lands. The supporting types (`Transition`, `Animatable`, `EnterTransition`/`ExitTransition`, spec/easing types) and the `*Kt` container classes now bind regardless.1 parent eb2f50b commit f0ae2b1
7 files changed
Lines changed: 891 additions & 12 deletions
File tree
- docs
- source/androidx.compose.animation
- animation-android
- PublicAPI
- Transforms
- animation-core-android
- PublicAPI
- Transforms
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| |||
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
282 | | - | |
283 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
| 367 | + | |
366 | 368 | | |
367 | 369 | | |
368 | 370 | | |
| |||
0 commit comments