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

RealmTransformer doesn't execute when running androidTest #7715

Open
danika opened this issue Aug 27, 2022 · 4 comments
Open

RealmTransformer doesn't execute when running androidTest #7715

danika opened this issue Aug 27, 2022 · 4 comments

Comments

@danika
Copy link

danika commented Aug 27, 2022

How frequently does the bug occur?

All the time

Description

In order to avoid duplicating fake test data across test and androidTest, I have created a module sharedtestcode which depends on app. I then consume sharedtestcode as a test dependency of the app module via testImplementation and androidTestImplementation.

This is the recommended way to share test data starting from Android Studio Chipmunk. (see: https://issuetracker.google.com/issues/232420188)

This seems to work fine when running unit tests, but when I attempt to run an android test, I get:

RealmTransformer doesn't seem to be applied. Please update the project configuration to use the Realm Gradle plugin.

Stacktrace & log output

No response

Can you reproduce the bug?

Yes, always

Reproduction Steps

Demo project: https://github.com/danika/RealmSharedTest

Version

10.11.1

What SDK flavour are you using?

Local Database only

Are you using encryption?

No, not using encryption

Platform OS and version(s)

Android (SDK 31)

Build environment

Android Studio version: Chipmunk 2021.2.1 Patch 2
Android Build Tools version: 7.2.2
Gradle version: 7.3.3

@rorbech
Copy link
Collaborator

rorbech commented Aug 29, 2022

Hi @danika. Thanks for the report. This seems like a duplicate of #3030 that originates from an issue around which classes that are passed to our transformer. The currently used transforer API of AGP has been undergoing development and will be removed from AGP 8.0, so the original reported issue is left as obsolete. We are currently in the process of migrating to the new API in #7714 (specifically also applying the transformer on unittest and test components) and with this we should hopefully also address this

@danika
Copy link
Author

danika commented Jan 19, 2023

hello again, I've updated the realm dependency in my demo project to 10.13.1-transformer-api and the problem persists :(

@codyrotwein
Copy link

same issue for me.

@danika
Copy link
Author

danika commented Apr 27, 2023

I can confirm that the issue is fixed with the following combo:

AGP 8.0.0
Kotlin 1.8.20
Realm 10.15.0

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants