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

Allow consumers to prefer APT in Kotlin projects #7727

Open
mannodermaus opened this issue Sep 20, 2022 · 2 comments
Open

Allow consumers to prefer APT in Kotlin projects #7727

mannodermaus opened this issue Sep 20, 2022 · 2 comments

Comments

@mannodermaus
Copy link

mannodermaus commented Sep 20, 2022

Problem

There is currently no way to bypass the usage of kapt for Kotlin projects using Realm. The plugin's code has a pending TODO comment about allowing the configuration of this setting, but no way to actually control it. This prevents people from using tools like NAPT for improving the build speed of their project. For instance, in my case, the only remaining library to rely on kapt is Realm and I'd like to move away from it to speed up compilations.

Unfortunately, moving to realm-kotlin is not a realistic alternative because of the huge undertaking in migrating the codebase to support it.

Solution

I'd like to request that a preferAptOnKotlinProject flag be added to its DSL of the Gradle plugin, with a default value of false.

Alternatives

No response

How important is this improvement for you?

I'd like to see it, but have a workaround

@cmelchior
Copy link
Contributor

Hi @mannodermaus.

Have you considered not applying the plugin and just manually doing what it does? Would that solve your problem? https://www.mongodb.com/docs/realm/sdk/java/troubleshooting/#customize-dependecies-defined-by-the-realm-gradle-plugin

@mannodermaus mannodermaus changed the title Allow consumers to disable prefer APT in Kotlin projects Allow consumers to prefer APT in Kotlin projects Sep 20, 2022
@mannodermaus
Copy link
Author

Thanks for the suggestion @cmelchior, I wasn't aware that the full extent of the Gradle plugin could be so easily unwrapped. Skipping the Gradle plugin in favor of a manual setup as per the linked guide works well. I'm demoting the priority of the request to "I'd like to see it, but have a workaround" 🙇‍♂️

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

3 participants