Un-strip Compose Animation bindings (animation-android, animation-core-android)#1448
Un-strip Compose Animation bindings (animation-android, animation-core-android)#1448Copilot wants to merge 3 commits into
Conversation
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
|
@copilot should we remove the *.Internal package/namespace? If so make sure to update namespaces file |
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Yes — those packages ( |
Xamarin.AndroidX.Compose.Animation.AndroidandXamarin.AndroidX.Compose.Animation.Core.Androidshipped empty — a blanket<remove-node path="/api/package" />stripped every type inandroidx.compose.animation.*andandroidx.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— targetedremove-nodetransformsRemoves only nodes that genuinely can't bind due to binder limitations:
vectorizemethods — Kotlin'sAnimationSpechierarchy 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 concreteVectorized*classes failed to implement it.TransitionState.getCurrentState/getTargetState— generic erasure yields un-overridable abstractRaw*Statemembers on the base (CS0534).DecayAnimationctor — two constructors whose generic params (T/AnimationVector) both erase toObject(CS0111).Internal packages removed
The internal Kotlin packages
androidx.compose.animation.core.internalandandroidx.compose.animation.internalonly exposed implementation-detail facade helpers (JvmDefaultWithCompatibility_jvmAndAndroidKt,PlatformOptimizedCancellationException*), which are not useful public API. Both packages are now removed viaremove-nodetransforms, and the correspondingAndroidX.Compose.Animation.Core.Internal/AndroidX.Compose.Animation.Internalnamespaces were dropped frompublished-namespaces.txtandPublicAPI.Unshipped.txt. The public@InternalAnimationApiopt-in annotation lives in thecorepackage (notcore.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
extraDependenciesrather than deleting the members:animation-core-android→kotlinx-coroutines-core-jvm(soDeferredTargetAnimation.updateTarget(CoroutineScope)binds).animation-android→ui-unit-android(soSharedTransitionScope : DensityandSplineBased*bind).Packaging / metadata
nugetVersionbumped1.11.2→1.11.2.1for both packages.published-namespaces.txt;docs/artifact-list-with-versions.mdupdated.PublicAPI.Unshipped.txt(core: 614 entries, animation: 227).Known limitation
Most user-facing
@Composables (AnimatedVisibility,Crossfade, …) remain stripped because their@JvmInline value classparameters 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*Ktcontainer classes now bind regardless.