Skip to content

Make commonMain dependencies as in AOSP#2749

Merged
Igor Demin (igordmn) merged 8 commits into
jb-mainfrom
igor.demin/restore-dependencies
Feb 11, 2026
Merged

Make commonMain dependencies as in AOSP#2749
Igor Demin (igordmn) merged 8 commits into
jb-mainfrom
igor.demin/restore-dependencies

Conversation

@igordmn

@igordmn Igor Demin (igordmn) commented Feb 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes https://youtrack.jetbrains.com/issue/CMP-9522/Sync-project-dependencies-with-AOSP

This is done to avoid merge conflicts, and moving towards merging build.gradle to jb-main during version updates.

The state is restored using "Compare before with Local" in IDEA on the 14051d6 commit. It should have the integration branch state (53a7a70) which should be equal to the AOSP state.

Can be reviewed commit by commit for more understanding of the chain of changes.

The Release Notes doesn't mentioned most of the removed api dependencies because this should not affect user projects. The dependencies are still provided as API via another api dependencies.

Testing

TeamCity passes

Release Notes

Migration Notes - Multiple Platforms

  • navigation-runtime, navigation-common no longer provide androidx.collection as an api transitive dependency. If your project doesn't compile with unresolved androidx.collection... classes add implementation("androidx.collection:collection:1.5.0"). This change is required to avoid differences with the original Jetpack libraries and allow reusing the same code without additional changes needed.

@igordmn Igor Demin (igordmn) force-pushed the igor.demin/restore-dependencies branch from 9f6acc2 to 9483d75 Compare February 7, 2026 01:20
Using "Compare before with Local" in IDEA on the 14051d6 commit. It should have the integration branch state (53a7a70), which should be equal to the AOSP state.
…s out of commonMain

Using "Compare before with Local" in IDEA on the 14051d6 commit. It should have the integration branch state (53a7a70), which should be equal to the AOSP state.
…entation)

Using "Compare before with Local" in IDEA on the 14051d6 commit. It should have the integration branch state (53a7a70), which should be equal to the AOSP state.
Using "Compare before with Local" in IDEA on the 14051d6 commit. It should have the integration branch state (53a7a70), which should be equal to the AOSP state.
Using "Compare before with Local" in IDEA on the 14051d6 commit. It should have the integration branch state (53a7a70), which should be equal to the AOSP state.
It is a new dependency inside `lifecycle-viewmodel-compose`, `"commonTest".
We removed them from commonMain, but the CMP targets need them

@MatkovIvan Ivan Matkov (MatkovIvan) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the release notes wording, instead of "no longer provide" it should clearly state that the state of dependencies was synced with AOSP

api(project(":navigation3:navigation3-ui"))
implementation("org.jetbrains.androidx.navigationevent:navigationevent-compose:1.0.0-rc02")
implementation("androidx.collection:collection:1.5.0")
implementation("org.jetbrains.androidx.navigationevent:navigationevent-compose:1.0.0-rc02")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was already updated in #2696. Is it accidentally reverted due buildSrc merge?

Suggested change
implementation("org.jetbrains.androidx.navigationevent:navigationevent-compose:1.0.0-rc02")
implementation("org.jetbrains.androidx.navigationevent:navigationevent-compose:1.0.0")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check and return

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll restore in a separate PR.

P.S. I didn't use horizontal scroll when verifing the diff 😅

image

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2754

It is better to merge this PR first, as it easier to fix conflicts in 2754

Comment thread compose/ui/ui-test/build.gradle Outdated
api(project(":compose:ui:ui"))
api(project(":compose:ui:ui-text"))
api(project(":compose:ui:ui-unit"))
implementation("androidx.compose.runtime:runtime:1.10.2")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this version instead of project dependency?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I made a mistake here. It was an experiment during CI fixing.

Changed to a project dependency.

// when updating the runtime version please also update the runtime-saveable version
implementation(project(":compose:runtime:runtime"))
// We do not publish runtime-retain from the fork (it's KMP-compatible from the start)
// api(project(":compose:runtime:runtime-retain"))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore this comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is on purpose.

  1. If we decide to keep the comment, we need to add it for every project we don't publish
  2. But it adds unnecessary merge-conflicts and a "commented" noisy code that lives forever
  3. We already use approach that some projects are pinned to concrete versions compared to AOSP, it is no different here - we pinned the dependency to an artifact

@igordmn

Igor Demin (igordmn) commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator Author

Please update the release notes wording, instead of "no longer provide" it should clearly state that the state of dependencies was synced with AOSP

The idea is to provide actionable points to migrate users projects. If there is no actionable points, we should use N/A here. "Synced with AOSP" is an internal change that doesn't affect public projects except adding/removing API:

  • adding API dependency isn't a helpful change, we can just omit it
  • removing API requires migration only for the mentioned library

@igordmn

Copy link
Copy Markdown
Collaborator Author

Added to Release Notes:

This change is required to avoid differences with the original Jetpack libraries and allow reusing the same code without  additional changes needed.

@igordmn Igor Demin (igordmn) merged commit ce2ac48 into jb-main Feb 11, 2026
33 of 34 checks passed
@igordmn Igor Demin (igordmn) deleted the igor.demin/restore-dependencies branch February 11, 2026 14:54
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.

3 participants