Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline legacy com.android.tools:common and com.android.tools:sdk-common classes to unblock Dolphin upgrade #636

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

jrodbx
Copy link
Collaborator

@jrodbx jrodbx commented Nov 26, 2022

Bumping to layoutlib Dolphin has a dependency on a version of layoutlib-api which removes RenderParamsFlags.
One of those flags (FLAG_KEY_APPLICATION_PACKAGE) is replaced by a new method, LayoutlibCallback.getApplicationId.

However, bumping layoutlib-api transitively bumps com.android.tools:common past 27.2.2 where FolderWrapper(File) no longer exists.

The use of FolderWrapper(File) is related to the use of the deprecated ResourceRepository, referenced in #524.

On a separate note, bumping sdk-common to 27.0.0 fails, because that same deprecated ResourceRepository is removed.

Both of these should be obsoleted once we rewrite the internal resource loading mechanism. However, since this is currently blocking support for Dolphin which is blocking support for Electric Eel, which is blocking support for SDK 33, let's inline both the com.android.io classes and com.android.ide.common.resources.deprecated to keep current behavior and allow bumping common and sdk-common to more recent versions.

Removal of FolderWrapper(File) et al. from common: https://android.googlesource.com/platform/tools/base/+/1accd73583827d68371c8bc32af0645a20a3e3a6
Removal of ResourceRepository et al. from sdk-common: https://android.googlesource.com/platform/tools/base/+/f870b9e262973c0742380e8a5fbb74977b44fa14

PS: Along the way, sdk-common also removed its direct dependency on trove4j (related to JCenter deprecation?): https://android.googlesource.com/platform/tools/base/+/1be1730b1c5e2b3bce548c015c00172c217eeabf

so we also add that directly here.

@jrodbx jrodbx merged commit 6fe3571 into master Nov 28, 2022
@jrodbx jrodbx deleted the jrod/2022-11-26/inline-legacy-tools-deps branch November 28, 2022 18:45
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.

None yet

3 participants