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

Migrate to new transformer API #7714

Closed
sync-by-unito bot opened this issue Aug 25, 2022 · 3 comments · Fixed by #7694
Closed

Migrate to new transformer API #7714

sync-by-unito bot opened this issue Aug 25, 2022 · 3 comments · Fixed by #7694
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Aug 25, 2022

Due to removal of the old transformer API we will have to migrate to the new AGP transformer infrastructure: https://developer.android.com/studio/releases/gradle-plugin-api-updates#agp-8-0-0

From AGP 7.2.x using the old transformer API will issue the below warning during the build.

AGPBI: {"kind":"warning","text":"API 'android.registerTransform' is obsolete.\nIt will be removed in version 8.0 of the Android Gradle plugin.\nThe Transform API is removed to improve build performance. Projects that use the\nTransform API force the Android Gradle plugin to use a less optimized flow for the\nbuild that can result in large regressions in build times. It’s also difficult to\nuse the Transform API and combine it with other Gradle features; the replacement\nAPIs aim to make it easier to extend the build without introducing performance or\ncorrectness issues.\n\nThere is no single replacement for the Transform API—there are new, targeted\nAPIs for each use case. All the replacement APIs are in the\nandroidComponents {} block.\nFor more information, see https://developer.android.com/studio/releases/gradle-plugin-api-updates#transform-api.\nTo determine what is calling android.registerTransform, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.","sources":[{}]}

@TylerMcCraw
Copy link

@rorbech Hey! I saw that you all did some work to fix this issue in the #7694 PR.
Is there anything I can do to help test it out and provide feedback? Is there a snapshot build with this update?

Thanks for taking care of this update!

@rorbech
Copy link
Collaborator

rorbech commented Sep 22, 2022

Hi @TylerMcCraw. We are working on doing a proper named release, but you are very welcome to try out the 10.12.0-transformer-api-SNAPSHOT until then. You can use snapshot releases following the instructions of https://github.com/realm/realm-java#using-snapshots

@rorbech
Copy link
Collaborator

rorbech commented Sep 29, 2022

We have released a 10.12.0-transformer-api-version of 10.12.0 that uses the new transformer API from the Android Gradle Plugin. Due to issues in the Android Gradle Plugin it only works from AGP 7.4 and above. See https://github.com/realm/realm-java/blob/release/transformer-api/CHANGELOG.md for the details.

We will keep doing these kind of release side by side with our normal releases until we deem it appropriately to make use of this new API the default.

@rorbech rorbech closed this as completed Sep 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants