Skip to content

[WIP] Android asset consolidation#861

Merged
brocollie08 merged 26 commits into
player-1-dot-zerofrom
android-asset-consolidation
May 19, 2026
Merged

[WIP] Android asset consolidation#861
brocollie08 merged 26 commits into
player-1-dot-zerofrom
android-asset-consolidation

Conversation

@brocollie08
Copy link
Copy Markdown
Contributor

@brocollie08 brocollie08 commented May 5, 2026

AsyncHydrationTrackerPlugin now works with both XML and Compose assets

  • Single source of truth for if the asset tree is done rendering — onHydrationStarted / onHydrationComplete hooks fire across the entire tree, including ComposableAsset children.
  • Each asset's render lifecycle handles renewing the hydrationScope on rehydrate and cancelled on re-render.

SuspendableAsset and DecodableAsset collapsed into RenderableAsset

  • SuspendableAsset is deprecated; its async/suspending render API is now built into the base RenderableAsset class.
  • DecodableAsset is also deprecated in favor of RenderableAsset — typed decoding from the asset node is part of the base class via the constructor's serializer.
  • One base class for all asset implementations regardless of sync/async or XML/Compose. ComposableAsset is the only specialization that remains, and it extends RenderableAsset directly.

💥 Breaking — RenderableAsset API 💥

  • hydrate is now non-suspending: fun CoroutineScope.hydrate(view: View, data: Data).
  • initView(data: Data) replaces the old no-arg initView(); runs on Dispatchers.Default.
  • Direct val data property access is removed; use suspend fun getData().
  • Child rendering: replace the old child.render(parent.requireContext(), styles) extension family with inflate(child, container, styles). The new API handles render tracker registration, hydration scoping, and view insertion in one call.
  • AnyAsset is now a typealias for RenderableAsset<*> and can be used to declare data types that are expected to be assets.

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
  • N/A

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs

@brocollie08 brocollie08 changed the base branch from main to player-1-dot-zero May 14, 2026 23:55
@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (d09c972) to head (c2dc0ae).

Additional details and impacted files
@@           Coverage Diff            @@
##   player-1-dot-zero   #861   +/-   ##
========================================
========================================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brocollie08 brocollie08 marked this pull request as ready for review May 19, 2026 16:29
@brocollie08 brocollie08 requested a review from a team as a code owner May 19, 2026 16:29
@brocollie08 brocollie08 requested a review from a team as a code owner May 19, 2026 16:29
@brocollie08 brocollie08 merged commit 2fdb374 into player-1-dot-zero May 19, 2026
17 checks passed
@brocollie08 brocollie08 deleted the android-asset-consolidation branch May 19, 2026 16:29
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.

2 participants